Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
这么水的题 居然WA三次。。。不忍直视#include<iostream> #include<stdio.h> using namespace std; int main () { int n; int a[100][100]; int win[100]; scanf("%d",&n); int i,j; for (i=1;i<=n;i++) for (j=1;j<=n;j++) { cin >>a[i][j]; } int temp=0,t=0; for (i=1;i<=n;i++) for (j=1;j<=n;j++) { if (a[i][j]==3) win[i] ++; if (win[i]>temp) {temp = win[i]; t = i;} } cout << t<<endl ; return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator