답안 #17326

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
17326 2015-11-20T23:24:03 Z tncks0121 돌 무게 재기 (IZhO11_stones) C++14
8 / 100
219 ms 40980 KB
#include <stdio.h>
#include <stdlib.h>
#include <bits/stdc++.h>

using namespace std;

int N;
int X[100][100500];
long long L[100], R[100];
int main() {
  scanf("%d", &N);
  for(int i = 0; i < 100; i++) {
  	X[i][0] = rand() % 10000 + 1;
    for(int j = 1; j < N; j++) X[i][j] = X[i][j - 1] + rand() % 10000 + 1;
  }
  
  while(N--) {
    int P, S; scanf("%d%d", &P, &S);
    bool a1 = false, a2 = false;
    for(int i = 0; i < 100; i++) {
      (S == 1 ? L : R)[i] += X[i][P - 1];
      if(L[i] < R[i]) a1 = true;
      if(L[i] > R[i]) a2 = true;
    }
    if(a1 ^ a2) {
      puts(a1 ? "<" : ">");
    }else {
      puts("?");
    }
  }
  
  return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 40980 KB Output isn't correct - 5th words differ - expected: '?', found: '<'
2 Incorrect 0 ms 40980 KB Output isn't correct - 6th words differ - expected: '?', found: '>'
3 Incorrect 0 ms 40980 KB Output isn't correct - 3rd words differ - expected: '?', found: '<'
4 Incorrect 0 ms 40980 KB Output isn't correct - 3rd words differ - expected: '?', found: '<'
5 Incorrect 6 ms 40980 KB Output isn't correct - 3rd words differ - expected: '?', found: '>'
6 Incorrect 0 ms 40980 KB Output isn't correct - 3rd words differ - expected: '?', found: '<'
7 Incorrect 0 ms 40980 KB Output isn't correct - 17th words differ - expected: '?', found: '<'
8 Incorrect 8 ms 40980 KB Output isn't correct - 3rd words differ - expected: '?', found: '<'
9 Incorrect 0 ms 40980 KB Output isn't correct - 7th words differ - expected: '?', found: '<'
10 Incorrect 14 ms 40980 KB Output isn't correct - 8th words differ - expected: '?', found: '<'
11 Incorrect 141 ms 40980 KB Output isn't correct - 4th words differ - expected: '?', found: '<'
12 Incorrect 219 ms 40980 KB Output isn't correct - 4th words differ - expected: '?', found: '>'
13 Correct 189 ms 40980 KB Output is correct - 100000 tokens
14 Correct 209 ms 40980 KB Output is correct - 100000 tokens
15 Incorrect 185 ms 40980 KB Output isn't correct - 26th words differ - expected: '?', found: '<'
16 Incorrect 190 ms 40980 KB Output isn't correct - 9th words differ - expected: '?', found: '>'
17 Incorrect 197 ms 40980 KB Output isn't correct - 3rd words differ - expected: '?', found: '<'
18 Incorrect 170 ms 40980 KB Output isn't correct - 4th words differ - expected: '?', found: '<'
19 Incorrect 180 ms 40980 KB Output isn't correct - 17th words differ - expected: '?', found: '>'
20 Incorrect 195 ms 40980 KB Output isn't correct - 13th words differ - expected: '?', found: '>'
21 Incorrect 193 ms 40980 KB Output isn't correct - 11th words differ - expected: '?', found: '<'
22 Incorrect 193 ms 40980 KB Output isn't correct - 11th words differ - expected: '?', found: '<'
23 Incorrect 201 ms 40980 KB Output isn't correct - 7th words differ - expected: '?', found: '<'
24 Incorrect 196 ms 40980 KB Output isn't correct - 3rd words differ - expected: '?', found: '<'
25 Incorrect 187 ms 40980 KB Output isn't correct - 9th words differ - expected: '?', found: '<'