답안 #940418

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
940418 2024-03-07T09:04:05 Z Sundavar Monster Game (JOI21_monster) C++17
0 / 100
108 ms 596 KB
#include "monster.h"
#include <bits/stdc++.h>
using namespace std;


std::vector<int> Solve(int N) {
  std::vector<int> T(N);
  vector<int> cnt(N);
  vector<int> amb1, amb2;
  for(int i = 0; i < N; i++){
    for(int j = 0; j < N; j++) if(j != i) cnt[i] += Query(i, j); 
    if(cnt[i] == 1) amb1.push_back(i);
    if(cnt[i] == N-2) amb2.push_back(i);
  }
  (Query(amb1[0], amb1[1]) ? cnt[amb1[0]] : cnt[amb1[1]])--;
  (Query(amb2[0], amb2[1]) ? cnt[amb2[1]] : cnt[amb2[0]])++;
  for (int i = 0; i < N; i++) T[i] = cnt[i];
  return T;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 596 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 1 ms 548 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 0 ms 344 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Correct 0 ms 344 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
11 Correct 0 ms 344 KB Output is correct
12 Correct 1 ms 344 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 0 ms 344 KB Output is correct
15 Correct 0 ms 344 KB Output is correct
16 Incorrect 108 ms 412 KB Wrong Answer [6]
17 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 596 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 1 ms 548 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 0 ms 344 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Correct 0 ms 344 KB Output is correct
10 Correct 1 ms 344 KB Output is correct
11 Correct 0 ms 344 KB Output is correct
12 Correct 1 ms 344 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 0 ms 344 KB Output is correct
15 Correct 0 ms 344 KB Output is correct
16 Incorrect 108 ms 412 KB Wrong Answer [6]
17 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 100 ms 424 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -