Submission #370397

#TimeUsernameProblemLanguageResultExecution timeMemory
370397fhvirusXoractive (IZhO19_xoractive)C++17
6 / 100
1 ms364 KiB
// Knapsack DP is harder than FFT. #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; #define ff first #define ss second #define pb emplace_back #define FOR(i,n) for(int i = 0; i < (n); ++i) #define FOR(i,a,b) for(int i = (a); i <= (b); ++i) #define AI(x) (x).begin(),(x).end() template<typename I> bool chmax(I &a, I b){ return a < b ? (a = b, true) : false;} template<typename I> bool chmin(I &a, I b){ return a > b ? (a = b, true) : false;} #ifdef OWO #define debug(args...) LKJ("[ " + string(#args) + " ]", args) void LKJ(){ cerr << endl;} template<typename I, typename...T> void LKJ(I&&x, T&&...t){ cerr<<x<<", ", LKJ(t...);} template<typename I> void DE(I a, I b){ while(a < b) cerr<<*a<<" \n"[next(a)==b], ++a;} #else #define debug(...) 0 #define DE(...) 0 #endif #ifndef OWO #include "interactive.h" using namespace std; #else int ask(int i); int[] get_pairwise_xor(int[] pos); #endif const int N = 101; vector<int> guess(int n) { vector <int> ans; vector<int> p; for(int i = 1; i <= n; ++i) p.pb(i); p = get_pairwise_xor(p); for (int i = 1; i <= n; i++) { ans.push_back(ask(i)); } return ans; }

Compilation message (stderr)

Xoractive.cpp:10: warning: "FOR" redefined
   10 | #define FOR(i,a,b) for(int i = (a); i <= (b); ++i)
      | 
Xoractive.cpp:9: note: this is the location of the previous definition
    9 | #define FOR(i,n) for(int i = 0; i < (n); ++i)
      |
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...