摘要: 地址:http://codeforces.com/contest/270/problem/C边读边算,算出当前所需最小箱子,每次结果进行对比,找最大 1 #include <iostream> 2 using namespace std; 3 4 int n,k,a; 5 6 int main() 7 { 8 ios::sync_with_stdio(false); 9 cin>>n;10 int ans=0;11 for(int i=0;i<n;i++)12 {13 cin>>k>>a;14 if(1==a) k++... 阅读全文
posted @ 2013-02-02 21:44 tjsuhst 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 地址:http://codeforces.com/contest/270/problem/B更新的数字会上浮,从后往前找降序子串,这就是没有更新的,从而得到更新的数量 1 #include <iostream> 2 using namespace std; 3 4 int n,a[100000]; 5 6 int main() 7 { 8 ios::sync_with_stdio(false); 9 int con=1;10 cin>>n;11 for(int i=0;i<n;i++)12 {13 cin>>a[i];14 }... 阅读全文
posted @ 2013-02-02 21:42 tjsuhst 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 地址:http://codeforces.com/contest/270/problem/A用多边形外角来做,外角和为360度,然后比对边数 1 #include <iostream> 2 using namespace std; 3 4 int t,a; 5 6 int main() 7 { 8 ios::sync_with_stdio(false); 9 cin>>t;10 while(t--)11 {12 cin>>a;13 int n;14 n=360/(180-a);15 int su... 阅读全文
posted @ 2013-02-02 21:20 tjsuhst 阅读(208) 评论(0) 推荐(0) 编辑