摘要:
原题链接:http://acm.uestc.edu.cn/problem.php?pid=1020分析:按升序排序即可。Vote 1 #include<iostream> 2 #include<cstdio> 3 #include<algorithm> 4 #include<functional> 5 using namespace std; 6 int voter[105]; 7 int main() 8 { 9 int n,ans;10 while(scanf("%d",&n)==1)11 {12 if(n==0) 阅读全文
摘要:
原题链接:http://acm.uestc.edu.cn/problem.php?pid=1043输出前m大的数据 1 #include<iostream> 2 #include<cstdio> 3 #include<algorithm> 4 #include<functional> 5 using namespace std; 6 int queue[1000005]; 7 int main() 8 { 9 int n,m,k;10 while(scanf("%d%d",&n,&m)!=EOF)11 {12 阅读全文
摘要:
原题链接:http://acm.uestc.edu.cn/problem.php?pid=1047Cake 1 #include<iostream> 2 #include<cstdio> 3 using namespace std; 4 int main() 5 { 6 long long t,n,m; 7 scanf("%lld",&t); 8 while(t--) 9 {10 scanf("%lld%lld",&n,&m);11 printf("%lld\n",n*m-1);12 } 阅读全文