Submission #1014863

#TimeUsernameProblemLanguageResultExecution timeMemory
1014863Ausp3xCombo (IOI18_combo)C++17
0 / 100
0 ms344 KiB
// 人外有人,天外有天 // author: Ausp3x #pragma GCC optimize("O1, O2, O3, Ofast, unroll-loops") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include "combo.h" using namespace std; using namespace __gnu_pbds; #define fi first #define se second #define pb push_back // #define DEBUG typedef long long lng; typedef pair<int, int> pi; typedef vector<int> vi; typedef pair<lng, lng> pl; typedef vector<lng> vl; int const INF32 = 0x3f3f3f3f; lng const INF64 = 0x3f3f3f3f3f3f3f3f; #ifdef DEBUG int press(string p) { return -1; } #endif string guess_sequence(int N) { char chrs[4] = {'A', 'B', 'X', 'Y'}; for (int i = 1; i < 4; i++) { string cur; cur += chrs[i]; int res = press(cur); if (res == 1) { swap(chrs[0], chrs[i]); sort(chrs + 1, chrs + 4); break; } } string ans; ans += chrs[0]; for (int _ = 1; _ < N; _++) { string cur; cur += ans; cur += chrs[2]; cur += ans; cur += chrs[3]; cur += chrs[1]; cur += ans; cur += chrs[3]; cur += chrs[2]; cur += ans; cur += chrs[3]; cur += chrs[3]; int res = press(cur); ans += cur + chrs[res - ans.size() + 1]; } return ans; } #ifdef DEBUG int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t = 1; cin >> t; while (t--) { } return 0; } #endif

Compilation message (stderr)

combo.cpp:4:55: warning: bad option '-f O2' to pragma 'optimize' [-Wpragmas]
    4 | #pragma GCC optimize("O1, O2, O3, Ofast, unroll-loops")
      |                                                       ^
combo.cpp:4:55: warning: bad option '-f O3' to pragma 'optimize' [-Wpragmas]
combo.cpp:4:55: warning: bad option '-f Ofast' to pragma 'optimize' [-Wpragmas]
combo.cpp:4:55: warning: bad option '-f unroll-loops' to pragma 'optimize' [-Wpragmas]
In file included from combo.cpp:7:
combo.h:5:33: warning: bad option '-f O2' to attribute 'optimize' [-Wattributes]
    5 | std::string guess_sequence(int N);
      |                                 ^
combo.h:5:33: warning: bad option '-f O3' to attribute 'optimize' [-Wattributes]
combo.h:5:33: warning: bad option '-f Ofast' to attribute 'optimize' [-Wattributes]
combo.h:5:33: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
combo.h:5:33: warning: bad option '-f O2' to attribute 'optimize' [-Wattributes]
combo.h:5:33: warning: bad option '-f O3' to attribute 'optimize' [-Wattributes]
combo.h:5:33: warning: bad option '-f Ofast' to attribute 'optimize' [-Wattributes]
combo.h:5:33: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
combo.h:7:24: warning: bad option '-f O2' to attribute 'optimize' [-Wattributes]
    7 | int press(std::string p);
      |                        ^
combo.h:7:24: warning: bad option '-f O3' to attribute 'optimize' [-Wattributes]
combo.h:7:24: warning: bad option '-f Ofast' to attribute 'optimize' [-Wattributes]
combo.h:7:24: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
combo.h:7:24: warning: bad option '-f O2' to attribute 'optimize' [-Wattributes]
combo.h:7:24: warning: bad option '-f O3' to attribute 'optimize' [-Wattributes]
combo.h:7:24: warning: bad option '-f Ofast' to attribute 'optimize' [-Wattributes]
combo.h:7:24: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
combo.cpp:30:28: warning: bad option '-f O2' to attribute 'optimize' [-Wattributes]
   30 | string guess_sequence(int N) {
      |                            ^
combo.cpp:30:28: warning: bad option '-f O3' to attribute 'optimize' [-Wattributes]
combo.cpp:30:28: warning: bad option '-f Ofast' to attribute 'optimize' [-Wattributes]
combo.cpp:30:28: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...