# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
375091 | 2021-03-09T02:36:22 Z | daniel920712 | Naan (JOI19_naan) | C++14 | 356 ms | 200136 KB |
#include <iostream> #include <stdio.h> #include <stdlib.h> #include <vector> using namespace std; vector < long long > sum[1005]; long long all[1005]; int main() { long long N,M,i,j,k,tt=0,t,x; scanf("%lld %lld",&N,&M); x=M; for(i=0;i<N;i++) { tt=0; sum[i].push_back(tt); for(j=0;j<M;j++) { scanf("%lld",&t); all[i]+=t; for(k=0;k<N*M;k++) { tt+=t; sum[i].push_back(tt); } } } M*=(N*M); //printf("%lld\n",M); for(i=1;i<M;i++) { if(sum[0][i]/all[0]>=x&&(sum[1][M]-sum[1][i])/all[1]>=x) { printf("%lld %lld\n",i,M/x); printf("1 2\n"); return 0; } if(sum[1][i]/all[1]>=x&&(sum[0][M]-sum[0][i])/all[0]>=x) { printf("%lld %lld\n",i,M/x); printf("2 1\n"); return 0; } } printf("-1\n"); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 179 ms | 102164 KB | Output is correct |
3 | Correct | 205 ms | 111172 KB | Output is correct |
4 | Correct | 235 ms | 122620 KB | Output is correct |
5 | Correct | 87 ms | 68112 KB | Output is correct |
6 | Correct | 3 ms | 2528 KB | Output is correct |
7 | Correct | 168 ms | 100688 KB | Output is correct |
8 | Correct | 160 ms | 108496 KB | Output is correct |
9 | Correct | 7 ms | 4828 KB | Output is correct |
10 | Correct | 199 ms | 124180 KB | Output is correct |
11 | Incorrect | 313 ms | 116884 KB | Integer parameter [name=A_i] equals to -1, violates the range [1, 2000000000000] |
12 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 99 ms | 70948 KB | Output is correct |
2 | Incorrect | 356 ms | 200136 KB | X_i is not increasing |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 364 KB | Output is correct |
2 | Correct | 179 ms | 102164 KB | Output is correct |
3 | Correct | 205 ms | 111172 KB | Output is correct |
4 | Correct | 235 ms | 122620 KB | Output is correct |
5 | Correct | 87 ms | 68112 KB | Output is correct |
6 | Correct | 3 ms | 2528 KB | Output is correct |
7 | Correct | 168 ms | 100688 KB | Output is correct |
8 | Correct | 160 ms | 108496 KB | Output is correct |
9 | Correct | 7 ms | 4828 KB | Output is correct |
10 | Correct | 199 ms | 124180 KB | Output is correct |
11 | Incorrect | 313 ms | 116884 KB | Integer parameter [name=A_i] equals to -1, violates the range [1, 2000000000000] |
12 | Halted | 0 ms | 0 KB | - |