Submission #1153349

#TimeUsernameProblemLanguageResultExecution timeMemory
1153349zhasynUnscrambling a Messy Bug (IOI16_messy)C++20
0 / 100
0 ms328 KiB
#include "messy.h" #include <bits/stdc++.h> #define pb push_back #define pf push_front using namespace std; #define F first #define S second typedef long long ll; #define pii pair <int, int> #define pll pair <ll, ll> typedef long double ld; const ll N = 2 * 1e5 + 100, M = 1e7 + 10, len = 21, inf = 1e18; const ll mod = 998244353; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); ll um(ll a, ll b){ return (1LL * a * b) % mod; } ll subr(ll a, ll b){ return ((1LL * a - b) % mod + mod) % mod; } bool was[N]; vector<int> restore_permutation(int n, int w, int r) { string s = "", t = ""; vector <int> vec; for(int i = 0; i < n; i++){ s += '0'; t += '0'; } for(int i = 0; i < n; i++){ s[i] = '1'; add_element(s); } compile_set(); bool res; for(int i = 0; i < n; i++){ for(int j = 0; j < n; j++){ if(was[i]) continue; t[j] = '1'; res = check_element(t); if(res){ was[i] = true; vec.pb(i); break; } t[j] = '0'; } } return vec; } // int main() { // ios::sync_with_stdio(false); // cin.tie(NULL); // return 0; // }

Compilation message (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...