답안 #676231

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
676231 2022-12-29T22:01:05 Z Sam_a17 벽 칠하기 (APIO20_paint) C++17
40 / 100
161 ms 36408 KB
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
//#include "temp.cpp"
#include <cstdio>
using namespace std;
 
#ifndef ONLINE_JUDGE
#define dbg(x) cerr << #x <<" "; print(x); cerr << endl;
#else
#define dbg(x)
#endif
 
#define sz(x) (int)x.size()
#define len(x) (int)x.length()
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define clr(x) (x).clear()
#define uniq(x) x.resize(unique(all(x)) - x.begin());
#define blt __builtin_popcount
 
#define pb push_back
#define popf pop_front
#define popb pop_back
#define ld long double
 
void print(long long t) {cerr << t;}
void print(int t) {cerr << t;}
void print(string t) {cerr << t;}
void print(char t) {cerr << t;}
void print(double t) {cerr << t;}
void print(long double t) {cerr << t;}
void print(unsigned long long t) {cerr << t;}
 
template <class T, class V> void print(pair <T, V> p);
template <class T> void print(vector <T> v);
template <class T> void print(set <T> v);
template <class T, class V> void print(map <T, V> v);
template <class T> void print(multiset <T> v);
template <class T, class V> void print(T v[],V n) {cerr << "["; for(int i = 0; i < n; i++) {print(v[i]); cerr << " "; } cerr << "]";}
template <class T, class V> void print(pair <T, V> p) {cerr << "{"; print(p.first); cerr << ","; print(p.second); cerr << "}";}
template <class T> void print(vector <T> v) {cerr << "[ "; for (T i : v) {print(i); cerr << " ";} cerr << "]";}
template <class T> void print(set <T> v) {cerr << "[ "; for (T i : v) {print(i); cerr << " ";} cerr << "]";}
template <class T> void print(multiset <T> v) {cerr << "[ "; for (T i : v) {print(i); cerr << " ";} cerr << "]";}
template <class T, class V> void print(map <T, V> v) {cerr << "[ "; for (auto i : v) {print(i); cerr << " ";} cerr << "]";}
template <class T> void print(deque <T> v) {cerr << "[ "; for (T i : v) {print(i); cerr << " ";} cerr << "]";}
 
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
#define nl '\n'
 
// for random generations
// mt19937 myrand(chrono::steady_clock::now().time_since_epoch().count());
mt19937 myrand(373);
 
// for grid problems
int dx[8] = {-1,0,1,0,1,-1,1,-1};
int dy[8] = {0,1,0,-1,1,1,-1,-1};
 
// lowest / (1 << 17) >= 1e5 / (1 << 18) >= 2e5 / (1 << 21) >= 1e6
void fastIO() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr); cout.tie(nullptr);
}
// file in/out
void setIO(string str = "") {
  fastIO();
 
  if(str == "input") {
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  } else {
    // freopen("skis.in", "r", stdin);
    // freopen("skis.out", "w", stdout);
  }
}
// Indexed Set  
template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
const int maxN = 3e5 + 15, LOG = 20;
vector<int> st[maxN];
bool start[maxN];
int lst[maxN], dp[2][maxN];
int nxt[maxN], up[maxN][LOG];

int minimumInstructions(int N, int M, int K, vector<int> C, vector<int> A, vector<vector<int>> B) {
  for(int i = 0; i < M; i++) {
    for(int j = 0; j < A[i]; j++) {
      st[B[i][j]].push_back(i);
    }
  }

  for(int i = 0; i < N; i++) {
    C.push_back(C[i]);
  }

  for(auto i: st[C[0]]) {
    dp[0][i] = 1;
    lst[0] = 1;
  }

  for(int i = 1; i < 2 * N; i++) {
    for(auto j: st[C[i]]) {
      int last_index = (j - 1 + M) % M;
      dp[i & 1][j] = max(dp[i & 1][j], dp[!(i & 1)][last_index] + 1);
      dp[i & 1][j] = min(dp[i & 1][j], M);
      lst[i] = max(lst[i], dp[i & 1][j]);
    }
    for(auto j: st[C[i - 1]]) {
      dp[!(i & 1)][j] = 0;
    }
  }

  for(int i = 0; i < 2 * N; i++) {
    if(lst[i] == M) {
      start[i] = true;
    }
  }
  
  for(int i = 0; i < LOG; i++) up[maxN - 10][i] = maxN - 10;
  nxt[maxN - 10] = maxN - 10;

  vector<int> xd{maxN - 10};
  for(int i = 2 * N - 1; i >= 0; i--) {
    if(start[i]) {
      xd.push_back(i);
      up[i][0] = max(0, i - M);
    }
    nxt[i] = xd.back();

    if(!start[i]) {
      up[i][0] = up[nxt[i]][0];
    }
  }

  for(int i = 1; i < LOG; i++) {
    for(int j = 2 * N - 1; j >= 0; j--) {
      int curr = up[j][i - 1];
      curr = nxt[curr];
      up[j][i] = up[curr][i - 1];
    }
  }

  int answ = maxN;
  for(int i = 2 * N - 1; i >= N; i--) {
    if(!start[i]) continue;
    
    int ina = 0, inb = N + 5, aw = -1;
    int L = i - N;

    while(ina <= inb) {
      int mid = (ina + inb) / 2;
      int cr = i;
      for(int j = 0; j < LOG; j++) {
        if(mid & (1 << j)) {
          cr = up[cr][j];
        }
      }

      if(cr <= L) {
        aw = mid;
        inb = mid - 1;
      } else {
        ina = mid + 1;
      }
    }

    if(aw != -1) {
      answ = min(answ, aw);
    }
  }

  if(answ == maxN) answ = -1;
  return answ;
}

Compilation message

paint.cpp: In function 'void setIO(std::string)':
paint.cpp:69:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   69 |     freopen("input.txt", "r", stdin);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
paint.cpp:70:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   70 |     freopen("output.txt", "w", stdout);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 7380 KB Output is correct
2 Correct 4 ms 7380 KB Output is correct
3 Correct 4 ms 7380 KB Output is correct
4 Correct 4 ms 7380 KB Output is correct
5 Correct 4 ms 7380 KB Output is correct
6 Correct 5 ms 7380 KB Output is correct
7 Correct 5 ms 7380 KB Output is correct
8 Correct 3 ms 7380 KB Output is correct
9 Correct 4 ms 7380 KB Output is correct
10 Correct 4 ms 7380 KB Output is correct
11 Correct 3 ms 7380 KB Output is correct
12 Correct 4 ms 7380 KB Output is correct
13 Correct 4 ms 7508 KB Output is correct
14 Correct 4 ms 7508 KB Output is correct
15 Correct 4 ms 7508 KB Output is correct
16 Correct 5 ms 7488 KB Output is correct
17 Correct 4 ms 7508 KB Output is correct
18 Correct 5 ms 7508 KB Output is correct
19 Correct 4 ms 7508 KB Output is correct
20 Correct 4 ms 7508 KB Output is correct
21 Correct 4 ms 7508 KB Output is correct
22 Correct 22 ms 11384 KB Output is correct
23 Correct 23 ms 11348 KB Output is correct
24 Correct 26 ms 11324 KB Output is correct
25 Correct 23 ms 11460 KB Output is correct
26 Correct 24 ms 11464 KB Output is correct
27 Correct 14 ms 11232 KB Output is correct
28 Correct 10 ms 11144 KB Output is correct
29 Correct 9 ms 11092 KB Output is correct
30 Correct 9 ms 11092 KB Output is correct
31 Correct 24 ms 12376 KB Output is correct
32 Correct 24 ms 12352 KB Output is correct
33 Correct 26 ms 12364 KB Output is correct
34 Correct 24 ms 12364 KB Output is correct
35 Correct 27 ms 12436 KB Output is correct
36 Correct 24 ms 12308 KB Output is correct
37 Correct 31 ms 15180 KB Output is correct
38 Correct 29 ms 15108 KB Output is correct
39 Correct 35 ms 15172 KB Output is correct
40 Correct 98 ms 25452 KB Output is correct
41 Correct 65 ms 18544 KB Output is correct
42 Correct 80 ms 26560 KB Output is correct
43 Correct 36 ms 19668 KB Output is correct
44 Correct 29 ms 18408 KB Output is correct
45 Correct 51 ms 25928 KB Output is correct
46 Correct 95 ms 32828 KB Output is correct
47 Correct 65 ms 22856 KB Output is correct
48 Correct 52 ms 25252 KB Output is correct
49 Correct 59 ms 25992 KB Output is correct
50 Correct 70 ms 27196 KB Output is correct
51 Correct 67 ms 25672 KB Output is correct
52 Correct 100 ms 27204 KB Output is correct
53 Correct 98 ms 27204 KB Output is correct
54 Correct 82 ms 26880 KB Output is correct
55 Correct 58 ms 26188 KB Output is correct
56 Correct 53 ms 25932 KB Output is correct
57 Correct 63 ms 25928 KB Output is correct
58 Correct 156 ms 36344 KB Output is correct
59 Correct 161 ms 36380 KB Output is correct
60 Correct 149 ms 36404 KB Output is correct
61 Correct 146 ms 36356 KB Output is correct
62 Correct 145 ms 36408 KB Output is correct
63 Correct 143 ms 36404 KB Output is correct
64 Correct 105 ms 34224 KB Output is correct
65 Correct 94 ms 34212 KB Output is correct
66 Correct 105 ms 34240 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 7380 KB Output is correct
2 Correct 4 ms 7380 KB Output is correct
3 Correct 4 ms 7380 KB Output is correct
4 Correct 4 ms 7380 KB Output is correct
5 Correct 4 ms 7380 KB Output is correct
6 Correct 5 ms 7380 KB Output is correct
7 Correct 5 ms 7380 KB Output is correct
8 Correct 3 ms 7380 KB Output is correct
9 Correct 4 ms 7380 KB Output is correct
10 Correct 4 ms 7380 KB Output is correct
11 Correct 3 ms 7380 KB Output is correct
12 Correct 4 ms 7380 KB Output is correct
13 Correct 4 ms 7508 KB Output is correct
14 Correct 4 ms 7508 KB Output is correct
15 Correct 4 ms 7508 KB Output is correct
16 Correct 5 ms 7488 KB Output is correct
17 Correct 4 ms 7508 KB Output is correct
18 Correct 5 ms 7508 KB Output is correct
19 Correct 4 ms 7508 KB Output is correct
20 Correct 4 ms 7508 KB Output is correct
21 Correct 4 ms 7508 KB Output is correct
22 Correct 4 ms 7380 KB Output is correct
23 Correct 4 ms 7380 KB Output is correct
24 Correct 4 ms 7380 KB Output is correct
25 Correct 3 ms 7380 KB Output is correct
26 Correct 4 ms 7380 KB Output is correct
27 Correct 4 ms 7380 KB Output is correct
28 Correct 4 ms 7380 KB Output is correct
29 Correct 4 ms 7380 KB Output is correct
30 Correct 4 ms 7380 KB Output is correct
31 Correct 4 ms 7380 KB Output is correct
32 Correct 4 ms 7380 KB Output is correct
33 Correct 4 ms 7380 KB Output is correct
34 Correct 5 ms 7424 KB Output is correct
35 Correct 4 ms 7460 KB Output is correct
36 Correct 4 ms 7380 KB Output is correct
37 Correct 4 ms 7380 KB Output is correct
38 Correct 5 ms 7380 KB Output is correct
39 Correct 5 ms 7476 KB Output is correct
40 Correct 4 ms 7380 KB Output is correct
41 Correct 4 ms 7380 KB Output is correct
42 Correct 4 ms 7380 KB Output is correct
43 Correct 4 ms 7380 KB Output is correct
44 Correct 4 ms 7440 KB Output is correct
45 Correct 4 ms 7380 KB Output is correct
46 Correct 4 ms 7476 KB Output is correct
47 Correct 4 ms 7380 KB Output is correct
48 Correct 4 ms 7380 KB Output is correct
49 Correct 4 ms 7380 KB Output is correct
50 Correct 4 ms 7412 KB Output is correct
51 Correct 5 ms 7508 KB Output is correct
52 Correct 4 ms 7508 KB Output is correct
53 Correct 4 ms 7392 KB Output is correct
54 Correct 5 ms 7508 KB Output is correct
55 Correct 6 ms 7508 KB Output is correct
56 Correct 4 ms 7508 KB Output is correct
57 Correct 4 ms 7508 KB Output is correct
58 Correct 4 ms 7508 KB Output is correct
59 Correct 5 ms 7468 KB Output is correct
60 Correct 4 ms 7508 KB Output is correct
61 Correct 4 ms 7520 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 7380 KB Output is correct
2 Correct 4 ms 7380 KB Output is correct
3 Correct 3 ms 7380 KB Output is correct
4 Correct 4 ms 7380 KB Output is correct
5 Correct 4 ms 7380 KB Output is correct
6 Correct 4 ms 7380 KB Output is correct
7 Correct 4 ms 7380 KB Output is correct
8 Correct 5 ms 7380 KB Output is correct
9 Correct 5 ms 7380 KB Output is correct
10 Correct 3 ms 7380 KB Output is correct
11 Correct 4 ms 7380 KB Output is correct
12 Correct 4 ms 7380 KB Output is correct
13 Correct 3 ms 7380 KB Output is correct
14 Correct 4 ms 7380 KB Output is correct
15 Correct 4 ms 7508 KB Output is correct
16 Correct 4 ms 7508 KB Output is correct
17 Correct 4 ms 7508 KB Output is correct
18 Correct 5 ms 7488 KB Output is correct
19 Correct 4 ms 7508 KB Output is correct
20 Correct 5 ms 7508 KB Output is correct
21 Correct 4 ms 7508 KB Output is correct
22 Correct 4 ms 7508 KB Output is correct
23 Correct 4 ms 7508 KB Output is correct
24 Correct 22 ms 11384 KB Output is correct
25 Correct 23 ms 11348 KB Output is correct
26 Correct 26 ms 11324 KB Output is correct
27 Correct 4 ms 7380 KB Output is correct
28 Correct 3 ms 7380 KB Output is correct
29 Correct 4 ms 7380 KB Output is correct
30 Correct 4 ms 7380 KB Output is correct
31 Correct 4 ms 7380 KB Output is correct
32 Correct 4 ms 7380 KB Output is correct
33 Correct 4 ms 7380 KB Output is correct
34 Correct 4 ms 7380 KB Output is correct
35 Correct 4 ms 7380 KB Output is correct
36 Correct 4 ms 7380 KB Output is correct
37 Correct 5 ms 7424 KB Output is correct
38 Correct 4 ms 7460 KB Output is correct
39 Correct 4 ms 7380 KB Output is correct
40 Correct 4 ms 7380 KB Output is correct
41 Correct 5 ms 7380 KB Output is correct
42 Correct 5 ms 7476 KB Output is correct
43 Correct 4 ms 7380 KB Output is correct
44 Correct 4 ms 7380 KB Output is correct
45 Correct 4 ms 7380 KB Output is correct
46 Correct 4 ms 7380 KB Output is correct
47 Correct 4 ms 7440 KB Output is correct
48 Correct 4 ms 7380 KB Output is correct
49 Correct 4 ms 7476 KB Output is correct
50 Correct 4 ms 7380 KB Output is correct
51 Correct 4 ms 7380 KB Output is correct
52 Correct 4 ms 7380 KB Output is correct
53 Correct 4 ms 7412 KB Output is correct
54 Correct 5 ms 7508 KB Output is correct
55 Correct 4 ms 7508 KB Output is correct
56 Correct 4 ms 7392 KB Output is correct
57 Correct 5 ms 7508 KB Output is correct
58 Correct 6 ms 7508 KB Output is correct
59 Correct 4 ms 7508 KB Output is correct
60 Correct 4 ms 7508 KB Output is correct
61 Correct 4 ms 7508 KB Output is correct
62 Correct 5 ms 7468 KB Output is correct
63 Correct 4 ms 7508 KB Output is correct
64 Correct 4 ms 7520 KB Output is correct
65 Correct 5 ms 7380 KB Output is correct
66 Correct 5 ms 7380 KB Output is correct
67 Correct 5 ms 7380 KB Output is correct
68 Correct 4 ms 7380 KB Output is correct
69 Correct 5 ms 7380 KB Output is correct
70 Correct 6 ms 7636 KB Output is correct
71 Correct 6 ms 7636 KB Output is correct
72 Correct 6 ms 7636 KB Output is correct
73 Correct 5 ms 7508 KB Output is correct
74 Correct 6 ms 7508 KB Output is correct
75 Correct 5 ms 7600 KB Output is correct
76 Correct 22 ms 9996 KB Output is correct
77 Correct 20 ms 10508 KB Output is correct
78 Correct 26 ms 10860 KB Output is correct
79 Correct 6 ms 7508 KB Output is correct
80 Correct 5 ms 7380 KB Output is correct
81 Correct 5 ms 7388 KB Output is correct
82 Correct 6 ms 7480 KB Output is correct
83 Correct 6 ms 7508 KB Output is correct
84 Correct 7 ms 7636 KB Output is correct
85 Correct 6 ms 7612 KB Output is correct
86 Correct 6 ms 7612 KB Output is correct
87 Correct 6 ms 7636 KB Output is correct
88 Correct 6 ms 7636 KB Output is correct
89 Correct 6 ms 7636 KB Output is correct
90 Correct 30 ms 11192 KB Output is correct
91 Correct 31 ms 11072 KB Output is correct
92 Correct 30 ms 11088 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 7380 KB Output is correct
2 Correct 4 ms 7380 KB Output is correct
3 Correct 3 ms 7380 KB Output is correct
4 Correct 4 ms 7380 KB Output is correct
5 Correct 4 ms 7380 KB Output is correct
6 Correct 4 ms 7380 KB Output is correct
7 Correct 4 ms 7380 KB Output is correct
8 Correct 5 ms 7380 KB Output is correct
9 Correct 5 ms 7380 KB Output is correct
10 Correct 3 ms 7380 KB Output is correct
11 Correct 4 ms 7380 KB Output is correct
12 Correct 4 ms 7380 KB Output is correct
13 Correct 3 ms 7380 KB Output is correct
14 Correct 4 ms 7380 KB Output is correct
15 Correct 4 ms 7508 KB Output is correct
16 Correct 4 ms 7508 KB Output is correct
17 Correct 4 ms 7508 KB Output is correct
18 Correct 5 ms 7488 KB Output is correct
19 Correct 4 ms 7508 KB Output is correct
20 Correct 5 ms 7508 KB Output is correct
21 Correct 4 ms 7508 KB Output is correct
22 Correct 4 ms 7508 KB Output is correct
23 Correct 4 ms 7508 KB Output is correct
24 Correct 22 ms 11384 KB Output is correct
25 Correct 23 ms 11348 KB Output is correct
26 Correct 26 ms 11324 KB Output is correct
27 Correct 23 ms 11460 KB Output is correct
28 Correct 24 ms 11464 KB Output is correct
29 Correct 14 ms 11232 KB Output is correct
30 Correct 10 ms 11144 KB Output is correct
31 Correct 9 ms 11092 KB Output is correct
32 Correct 9 ms 11092 KB Output is correct
33 Correct 24 ms 12376 KB Output is correct
34 Correct 24 ms 12352 KB Output is correct
35 Correct 26 ms 12364 KB Output is correct
36 Correct 24 ms 12364 KB Output is correct
37 Correct 27 ms 12436 KB Output is correct
38 Correct 24 ms 12308 KB Output is correct
39 Correct 31 ms 15180 KB Output is correct
40 Correct 29 ms 15108 KB Output is correct
41 Correct 35 ms 15172 KB Output is correct
42 Correct 4 ms 7380 KB Output is correct
43 Correct 3 ms 7380 KB Output is correct
44 Correct 4 ms 7380 KB Output is correct
45 Correct 4 ms 7380 KB Output is correct
46 Correct 4 ms 7380 KB Output is correct
47 Correct 4 ms 7380 KB Output is correct
48 Correct 4 ms 7380 KB Output is correct
49 Correct 4 ms 7380 KB Output is correct
50 Correct 4 ms 7380 KB Output is correct
51 Correct 4 ms 7380 KB Output is correct
52 Correct 5 ms 7424 KB Output is correct
53 Correct 4 ms 7460 KB Output is correct
54 Correct 4 ms 7380 KB Output is correct
55 Correct 4 ms 7380 KB Output is correct
56 Correct 5 ms 7380 KB Output is correct
57 Correct 5 ms 7476 KB Output is correct
58 Correct 4 ms 7380 KB Output is correct
59 Correct 4 ms 7380 KB Output is correct
60 Correct 4 ms 7380 KB Output is correct
61 Correct 4 ms 7380 KB Output is correct
62 Correct 4 ms 7440 KB Output is correct
63 Correct 4 ms 7380 KB Output is correct
64 Correct 4 ms 7476 KB Output is correct
65 Correct 4 ms 7380 KB Output is correct
66 Correct 4 ms 7380 KB Output is correct
67 Correct 4 ms 7380 KB Output is correct
68 Correct 4 ms 7412 KB Output is correct
69 Correct 5 ms 7508 KB Output is correct
70 Correct 4 ms 7508 KB Output is correct
71 Correct 4 ms 7392 KB Output is correct
72 Correct 5 ms 7508 KB Output is correct
73 Correct 6 ms 7508 KB Output is correct
74 Correct 4 ms 7508 KB Output is correct
75 Correct 4 ms 7508 KB Output is correct
76 Correct 4 ms 7508 KB Output is correct
77 Correct 5 ms 7468 KB Output is correct
78 Correct 4 ms 7508 KB Output is correct
79 Correct 4 ms 7520 KB Output is correct
80 Correct 5 ms 7380 KB Output is correct
81 Correct 5 ms 7380 KB Output is correct
82 Correct 5 ms 7380 KB Output is correct
83 Correct 4 ms 7380 KB Output is correct
84 Correct 5 ms 7380 KB Output is correct
85 Correct 6 ms 7636 KB Output is correct
86 Correct 6 ms 7636 KB Output is correct
87 Correct 6 ms 7636 KB Output is correct
88 Correct 5 ms 7508 KB Output is correct
89 Correct 6 ms 7508 KB Output is correct
90 Correct 5 ms 7600 KB Output is correct
91 Correct 22 ms 9996 KB Output is correct
92 Correct 20 ms 10508 KB Output is correct
93 Correct 26 ms 10860 KB Output is correct
94 Correct 6 ms 7508 KB Output is correct
95 Correct 5 ms 7380 KB Output is correct
96 Correct 5 ms 7388 KB Output is correct
97 Correct 6 ms 7480 KB Output is correct
98 Correct 6 ms 7508 KB Output is correct
99 Correct 7 ms 7636 KB Output is correct
100 Correct 6 ms 7612 KB Output is correct
101 Correct 6 ms 7612 KB Output is correct
102 Correct 6 ms 7636 KB Output is correct
103 Correct 6 ms 7636 KB Output is correct
104 Correct 6 ms 7636 KB Output is correct
105 Correct 30 ms 11192 KB Output is correct
106 Correct 31 ms 11072 KB Output is correct
107 Correct 30 ms 11088 KB Output is correct
108 Correct 17 ms 11412 KB Output is correct
109 Correct 148 ms 10336 KB Output is correct
110 Correct 80 ms 9728 KB Output is correct
111 Correct 60 ms 9596 KB Output is correct
112 Correct 71 ms 10312 KB Output is correct
113 Correct 48 ms 9516 KB Output is correct
114 Correct 21 ms 10796 KB Output is correct
115 Correct 22 ms 10444 KB Output is correct
116 Correct 30 ms 12172 KB Output is correct
117 Correct 21 ms 10708 KB Output is correct
118 Correct 25 ms 11120 KB Output is correct
119 Correct 22 ms 11188 KB Output is correct
120 Correct 23 ms 11884 KB Output is correct
121 Correct 16 ms 10180 KB Output is correct
122 Correct 29 ms 12160 KB Output is correct
123 Correct 14 ms 10088 KB Output is correct
124 Correct 34 ms 13836 KB Output is correct
125 Correct 24 ms 11640 KB Output is correct
126 Incorrect 17 ms 10948 KB Output isn't correct
127 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 7380 KB Output is correct
2 Correct 4 ms 7380 KB Output is correct
3 Correct 3 ms 7380 KB Output is correct
4 Correct 4 ms 7380 KB Output is correct
5 Correct 4 ms 7380 KB Output is correct
6 Correct 4 ms 7380 KB Output is correct
7 Correct 4 ms 7380 KB Output is correct
8 Correct 5 ms 7380 KB Output is correct
9 Correct 5 ms 7380 KB Output is correct
10 Correct 3 ms 7380 KB Output is correct
11 Correct 4 ms 7380 KB Output is correct
12 Correct 4 ms 7380 KB Output is correct
13 Correct 3 ms 7380 KB Output is correct
14 Correct 4 ms 7380 KB Output is correct
15 Correct 4 ms 7508 KB Output is correct
16 Correct 4 ms 7508 KB Output is correct
17 Correct 4 ms 7508 KB Output is correct
18 Correct 5 ms 7488 KB Output is correct
19 Correct 4 ms 7508 KB Output is correct
20 Correct 5 ms 7508 KB Output is correct
21 Correct 4 ms 7508 KB Output is correct
22 Correct 4 ms 7508 KB Output is correct
23 Correct 4 ms 7508 KB Output is correct
24 Correct 22 ms 11384 KB Output is correct
25 Correct 23 ms 11348 KB Output is correct
26 Correct 26 ms 11324 KB Output is correct
27 Correct 23 ms 11460 KB Output is correct
28 Correct 24 ms 11464 KB Output is correct
29 Correct 14 ms 11232 KB Output is correct
30 Correct 10 ms 11144 KB Output is correct
31 Correct 9 ms 11092 KB Output is correct
32 Correct 9 ms 11092 KB Output is correct
33 Correct 24 ms 12376 KB Output is correct
34 Correct 24 ms 12352 KB Output is correct
35 Correct 26 ms 12364 KB Output is correct
36 Correct 24 ms 12364 KB Output is correct
37 Correct 27 ms 12436 KB Output is correct
38 Correct 24 ms 12308 KB Output is correct
39 Correct 31 ms 15180 KB Output is correct
40 Correct 29 ms 15108 KB Output is correct
41 Correct 35 ms 15172 KB Output is correct
42 Correct 98 ms 25452 KB Output is correct
43 Correct 65 ms 18544 KB Output is correct
44 Correct 80 ms 26560 KB Output is correct
45 Correct 36 ms 19668 KB Output is correct
46 Correct 29 ms 18408 KB Output is correct
47 Correct 51 ms 25928 KB Output is correct
48 Correct 95 ms 32828 KB Output is correct
49 Correct 65 ms 22856 KB Output is correct
50 Correct 52 ms 25252 KB Output is correct
51 Correct 59 ms 25992 KB Output is correct
52 Correct 70 ms 27196 KB Output is correct
53 Correct 67 ms 25672 KB Output is correct
54 Correct 100 ms 27204 KB Output is correct
55 Correct 98 ms 27204 KB Output is correct
56 Correct 82 ms 26880 KB Output is correct
57 Correct 58 ms 26188 KB Output is correct
58 Correct 53 ms 25932 KB Output is correct
59 Correct 63 ms 25928 KB Output is correct
60 Correct 156 ms 36344 KB Output is correct
61 Correct 161 ms 36380 KB Output is correct
62 Correct 149 ms 36404 KB Output is correct
63 Correct 146 ms 36356 KB Output is correct
64 Correct 145 ms 36408 KB Output is correct
65 Correct 143 ms 36404 KB Output is correct
66 Correct 105 ms 34224 KB Output is correct
67 Correct 94 ms 34212 KB Output is correct
68 Correct 105 ms 34240 KB Output is correct
69 Correct 4 ms 7380 KB Output is correct
70 Correct 3 ms 7380 KB Output is correct
71 Correct 4 ms 7380 KB Output is correct
72 Correct 4 ms 7380 KB Output is correct
73 Correct 4 ms 7380 KB Output is correct
74 Correct 4 ms 7380 KB Output is correct
75 Correct 4 ms 7380 KB Output is correct
76 Correct 4 ms 7380 KB Output is correct
77 Correct 4 ms 7380 KB Output is correct
78 Correct 4 ms 7380 KB Output is correct
79 Correct 5 ms 7424 KB Output is correct
80 Correct 4 ms 7460 KB Output is correct
81 Correct 4 ms 7380 KB Output is correct
82 Correct 4 ms 7380 KB Output is correct
83 Correct 5 ms 7380 KB Output is correct
84 Correct 5 ms 7476 KB Output is correct
85 Correct 4 ms 7380 KB Output is correct
86 Correct 4 ms 7380 KB Output is correct
87 Correct 4 ms 7380 KB Output is correct
88 Correct 4 ms 7380 KB Output is correct
89 Correct 4 ms 7440 KB Output is correct
90 Correct 4 ms 7380 KB Output is correct
91 Correct 4 ms 7476 KB Output is correct
92 Correct 4 ms 7380 KB Output is correct
93 Correct 4 ms 7380 KB Output is correct
94 Correct 4 ms 7380 KB Output is correct
95 Correct 4 ms 7412 KB Output is correct
96 Correct 5 ms 7508 KB Output is correct
97 Correct 4 ms 7508 KB Output is correct
98 Correct 4 ms 7392 KB Output is correct
99 Correct 5 ms 7508 KB Output is correct
100 Correct 6 ms 7508 KB Output is correct
101 Correct 4 ms 7508 KB Output is correct
102 Correct 4 ms 7508 KB Output is correct
103 Correct 4 ms 7508 KB Output is correct
104 Correct 5 ms 7468 KB Output is correct
105 Correct 4 ms 7508 KB Output is correct
106 Correct 4 ms 7520 KB Output is correct
107 Correct 5 ms 7380 KB Output is correct
108 Correct 5 ms 7380 KB Output is correct
109 Correct 5 ms 7380 KB Output is correct
110 Correct 4 ms 7380 KB Output is correct
111 Correct 5 ms 7380 KB Output is correct
112 Correct 6 ms 7636 KB Output is correct
113 Correct 6 ms 7636 KB Output is correct
114 Correct 6 ms 7636 KB Output is correct
115 Correct 5 ms 7508 KB Output is correct
116 Correct 6 ms 7508 KB Output is correct
117 Correct 5 ms 7600 KB Output is correct
118 Correct 22 ms 9996 KB Output is correct
119 Correct 20 ms 10508 KB Output is correct
120 Correct 26 ms 10860 KB Output is correct
121 Correct 6 ms 7508 KB Output is correct
122 Correct 5 ms 7380 KB Output is correct
123 Correct 5 ms 7388 KB Output is correct
124 Correct 6 ms 7480 KB Output is correct
125 Correct 6 ms 7508 KB Output is correct
126 Correct 7 ms 7636 KB Output is correct
127 Correct 6 ms 7612 KB Output is correct
128 Correct 6 ms 7612 KB Output is correct
129 Correct 6 ms 7636 KB Output is correct
130 Correct 6 ms 7636 KB Output is correct
131 Correct 6 ms 7636 KB Output is correct
132 Correct 30 ms 11192 KB Output is correct
133 Correct 31 ms 11072 KB Output is correct
134 Correct 30 ms 11088 KB Output is correct
135 Correct 17 ms 11412 KB Output is correct
136 Correct 148 ms 10336 KB Output is correct
137 Correct 80 ms 9728 KB Output is correct
138 Correct 60 ms 9596 KB Output is correct
139 Correct 71 ms 10312 KB Output is correct
140 Correct 48 ms 9516 KB Output is correct
141 Correct 21 ms 10796 KB Output is correct
142 Correct 22 ms 10444 KB Output is correct
143 Correct 30 ms 12172 KB Output is correct
144 Correct 21 ms 10708 KB Output is correct
145 Correct 25 ms 11120 KB Output is correct
146 Correct 22 ms 11188 KB Output is correct
147 Correct 23 ms 11884 KB Output is correct
148 Correct 16 ms 10180 KB Output is correct
149 Correct 29 ms 12160 KB Output is correct
150 Correct 14 ms 10088 KB Output is correct
151 Correct 34 ms 13836 KB Output is correct
152 Correct 24 ms 11640 KB Output is correct
153 Incorrect 17 ms 10948 KB Output isn't correct
154 Halted 0 ms 0 KB -