답안 #423523

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
423523 2021-06-11T08:36:25 Z 장태환(#7573) Monster Game (JOI21_monster) C++17
10 / 100
287 ms 264 KB
#include "monster.h"

namespace {

bool example_variable;

}  // namespace

std::vector<int> Solve(int N)
{
    std::vector<int> T(N);

    int i;
    for(i=0;i<N;i++)
    {
        int j;
        for(j=0;j<i;j++)
        {
            bool v=Query(i,j);
            if(v)
                T[i]++;
            else
                T[j]++;
        }
    }
    for(i=0;i<N;i++)
    {
        int j;
        for(j=0;j<i;j++)
        {
            if(T[i]==1&&T[j]==1)
            {
                bool v=Query(i,j);
                if(v)
                    T[i]--;
                else
                    T[j]--;
            }
            if(T[i]==N-2&&T[j]==N-2)
            {
                bool v=Query(i,j);
                if(!v)
                    T[i]++;
                else
                    T[j]++;
            }
        }
    }
    return T;
}

Compilation message

monster.cpp:5:6: warning: '{anonymous}::example_variable' defined but not used [-Wunused-variable]
    5 | bool example_variable;
      |      ^~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 200 KB Output is correct
2 Correct 1 ms 200 KB Output is correct
3 Correct 0 ms 200 KB Output is correct
4 Correct 1 ms 200 KB Output is correct
5 Correct 1 ms 200 KB Output is correct
6 Correct 1 ms 200 KB Output is correct
7 Correct 1 ms 200 KB Output is correct
8 Correct 1 ms 200 KB Output is correct
9 Correct 1 ms 200 KB Output is correct
10 Correct 1 ms 200 KB Output is correct
11 Correct 1 ms 200 KB Output is correct
12 Correct 1 ms 200 KB Output is correct
13 Correct 1 ms 200 KB Output is correct
14 Correct 0 ms 200 KB Output is correct
15 Correct 1 ms 200 KB Output is correct
16 Correct 165 ms 200 KB Output is correct
17 Correct 183 ms 200 KB Output is correct
18 Correct 89 ms 200 KB Output is correct
19 Correct 234 ms 200 KB Output is correct
20 Correct 92 ms 200 KB Output is correct
21 Correct 0 ms 200 KB Output is correct
22 Correct 1 ms 200 KB Output is correct
23 Correct 1 ms 200 KB Output is correct
24 Correct 1 ms 200 KB Output is correct
25 Correct 1 ms 200 KB Output is correct
26 Correct 234 ms 200 KB Output is correct
27 Correct 1 ms 200 KB Output is correct
28 Correct 0 ms 200 KB Output is correct
29 Correct 1 ms 200 KB Output is correct
30 Correct 1 ms 200 KB Output is correct
31 Correct 1 ms 200 KB Output is correct
32 Correct 174 ms 200 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 200 KB Output is correct
2 Correct 1 ms 200 KB Output is correct
3 Correct 0 ms 200 KB Output is correct
4 Correct 1 ms 200 KB Output is correct
5 Correct 1 ms 200 KB Output is correct
6 Correct 1 ms 200 KB Output is correct
7 Correct 1 ms 200 KB Output is correct
8 Correct 1 ms 200 KB Output is correct
9 Correct 1 ms 200 KB Output is correct
10 Correct 1 ms 200 KB Output is correct
11 Correct 1 ms 200 KB Output is correct
12 Correct 1 ms 200 KB Output is correct
13 Correct 1 ms 200 KB Output is correct
14 Correct 0 ms 200 KB Output is correct
15 Correct 1 ms 200 KB Output is correct
16 Correct 165 ms 200 KB Output is correct
17 Correct 183 ms 200 KB Output is correct
18 Correct 89 ms 200 KB Output is correct
19 Correct 234 ms 200 KB Output is correct
20 Correct 92 ms 200 KB Output is correct
21 Correct 0 ms 200 KB Output is correct
22 Correct 1 ms 200 KB Output is correct
23 Correct 1 ms 200 KB Output is correct
24 Correct 1 ms 200 KB Output is correct
25 Correct 1 ms 200 KB Output is correct
26 Correct 234 ms 200 KB Output is correct
27 Correct 1 ms 200 KB Output is correct
28 Correct 0 ms 200 KB Output is correct
29 Correct 1 ms 200 KB Output is correct
30 Correct 1 ms 200 KB Output is correct
31 Correct 1 ms 200 KB Output is correct
32 Correct 174 ms 200 KB Output is correct
33 Incorrect 287 ms 264 KB Wrong Answer [6]
34 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 224 ms 260 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -