Submission #492292

# Submission time Handle Problem Language Result Execution time Memory
492292 2021-12-06T13:05:10 Z asdfghjkl Poi (IOI09_poi) C++11
0 / 100
527 ms 40024 KB
#include<iostream>
#include<locale>
#include <iomanip>
#include<fstream>
#include<cmath>
#include<string>

using namespace std;
int main()
{
int n, t, p, temp=0;
cin>>n>>t>>p;
int TT[n][t], Kk[t], Z[n+1], L[n];
for (int i=1; i<=t+1; i++)
{
    Kk[i]=0;
    L[i]=0;
    Z[i]=0;
}
for (int i=1; i<=n; i++)
{
for (int o=1; o<=t; o++)
{
    cin>>TT[i][o];
    if (TT[i][o]==0) Kk[o]++;
}
}
for (int i=1; i<=n; i++)
{
for (int o=1; o<=t; o++)
{
   if (TT[i][o]==1) {Z[i]+=Kk[o]; L[i]++;};
}
}
cout<<Z[p]<<" ";
temp=Z[p];
for (int i=0; i<n; i++)
{
    if (Z[i]<Z[i+1]) swap (Z[i],Z[i+1]);
   else  if (Z[i]==Z[i+1])
    {
        if (L[i] < L[i+1])  {
           swap (Z[i],Z[i+1]) ;
        };

    }
}
for (int i=1; i<=n-1; i++)
{
    if (Z[i]==temp) {cout<<i<<endl;break;};


}
return 0;
}
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 336 KB Execution killed with signal 11
2 Runtime error 1 ms 336 KB Execution killed with signal 11
3 Runtime error 1 ms 336 KB Execution killed with signal 11
4 Runtime error 1 ms 336 KB Execution killed with signal 11
5 Runtime error 1 ms 336 KB Execution killed with signal 11
6 Runtime error 1 ms 336 KB Execution killed with signal 11
7 Runtime error 1 ms 464 KB Execution killed with signal 11
8 Runtime error 2 ms 464 KB Execution killed with signal 11
9 Runtime error 3 ms 464 KB Execution killed with signal 11
10 Runtime error 5 ms 592 KB Execution killed with signal 11
11 Runtime error 18 ms 1488 KB Execution killed with signal 11
12 Runtime error 27 ms 2344 KB Execution killed with signal 11
13 Runtime error 87 ms 6172 KB Execution killed with signal 11
14 Runtime error 126 ms 8712 KB Execution killed with signal 11
15 Runtime error 208 ms 15232 KB Execution killed with signal 11
16 Runtime error 248 ms 16484 KB Execution killed with signal 11
17 Runtime error 320 ms 24104 KB Execution killed with signal 11
18 Runtime error 361 ms 27304 KB Execution killed with signal 11
19 Runtime error 480 ms 36012 KB Execution killed with signal 11
20 Runtime error 527 ms 40024 KB Execution killed with signal 11