Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

这么水的题 居然WA三次。。。不忍直视

Posted by lyz963254 at 2014-08-18 21:58:24 on Problem 3224
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator