제출 #1292261

#제출 시각아이디문제언어결과실행 시간메모리
1292261blackscreen1Unscrambling a Messy Bug (IOI16_messy)C++20
100 / 100
4 ms588 KiB
#include "messy.h" #include <bits//stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef tree<long long, null_type, less<long long>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; typedef tree<long long, null_type, less_equal<long long>, rb_tree_tag, tree_order_statistics_node_update> ordered_multiset; #define ll long long #define ld long double #define iloop(m, h) for (auto i = m; i != h; i += (m < h ? 1 : -1)) #define jloop(m, h) for (auto j = m; j != h; j += (m < h ? 1 : -1)) #define kloop(m, h) for (auto k = m; k != h; k += (m < h ? 1 : -1)) #define lloop(m, h) for (auto l = m; l != h; l += (m < h ? 1 : -1)) #define iloop_(m, h, g) for (auto i = m; i < h; i += g) #define jloop_(m, h, g) for (auto j = m; j < h; j += g) #define kloop_(m, h, g) for (auto k = m; k < h; k += g) #define lloop_(m, h, g) for (auto l = m; l < h; l += g) #define getchar_unlocked _getchar_nolock // comment before submission #define pll pair<ll, ll> #define plll pair<ll, pll> #define pllll pair<pll, pll> #define vll vector<ll> #define qll queue<ll> #define dll deque<ll> #define pqll priority_queue<ll> #define gll greater<ll> #define INF 1000000000000000 #define MOD1 1000000007 #define MOD2 998244353 #define MOD3 1000000009 mt19937 rng(chrono::system_clock::now().time_since_epoch().count()); vector<int> restore_permutation(int n, int w, int r) { int bs = 0, t1 = n; while (t1 > 1) bs++, t1 >>= 1; bool res[n]; string s = ""; iloop(0, n) { jloop(0, bs) { memset(res, 0, sizeof(res)); if (i&(1<<j)) { kloop(0, n) lloop(0, j) if ((i&(1<<l)) != (k&(1<<l))) res[k] = 1; res[i] = 1; s = ""; iloop(0, n) s += '0' + res[i]; // cout << "add " << s << "\n"; add_element(s); } } } compile_set(); vector<bool> ans[n]; iloop(0, bs) { jloop(0, n) { memset(res, 0, sizeof(res)); kloop(0, n) lloop(0, i) if (ans[k][l] != ans[j][l]) res[k] = 1; res[j] = 1; s = ""; iloop(0, n) s += '0' + res[i]; // cout << "check " << s << "\n"; ans[j].push_back(check_element(s)); } } vector<int> actl; iloop(0, n) { actl.push_back(0); jloop(0, bs) actl[i] += (1<<j)*ans[i][j]; } return actl; }

컴파일 시 표준 에러 (stderr) 메시지

messy.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
messy_c.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...