Submission #1075048

#TimeUsernameProblemLanguageResultExecution timeMemory
1075048Ausp3xCOVID tests (CEOI24_covid)C++17
10 / 100
2778 ms344 KiB
// 人外有人,天外有天 // author: Ausp3x #pragma GCC optimize("O1, O2, O3, Ofast, unroll-loops") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #define fi first #define se second #define pb push_back // #define DEBUG typedef long long lng; typedef __int128 lli; template<class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; int const INF32 = 0x3f3f3f3f; lng const INF64 = 0x3f3f3f3f3f3f3f3f; int N; double P; bool test_students(vector<bool> &msk) { assert(msk.size() == N); string msk_str = "Q "; for (int i = 0; i < N; i++) msk_str += msk[i] ? '1' : '0'; cout << msk_str << endl; char res; cin >> res; return res == 'P'; } vector<bool> find_positive() { vector<bool> msk(N), ans(N); for (int i = 0; i < N; i++) { msk[i] = true; ans[i] = test_students(msk); msk[i] = false; } return ans; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int T; cin >> N >> P >> T; while (T--) { vector<bool> ans = find_positive(); string ans_str = "A "; for (int i = 0; i < N; i++) ans_str += ans[i] ? '1' : '0'; cout << ans_str << endl; char res; cin >> res; if (res == 'W') return 0; } return 0; }

Compilation message (stderr)

Main.cpp:4:55: warning: bad option '-f O2' to pragma 'optimize' [-Wpragmas]
    4 | #pragma GCC optimize("O1, O2, O3, Ofast, unroll-loops")
      |                                                       ^
Main.cpp:4:55: warning: bad option '-f O3' to pragma 'optimize' [-Wpragmas]
Main.cpp:4:55: warning: bad option '-f Ofast' to pragma 'optimize' [-Wpragmas]
Main.cpp:4:55: warning: bad option '-f unroll-loops' to pragma 'optimize' [-Wpragmas]
Main.cpp:24:37: warning: bad option '-f O2' to attribute 'optimize' [-Wattributes]
   24 | bool test_students(vector<bool> &msk) {
      |                                     ^
Main.cpp:24:37: warning: bad option '-f O3' to attribute 'optimize' [-Wattributes]
Main.cpp:24:37: warning: bad option '-f Ofast' to attribute 'optimize' [-Wattributes]
Main.cpp:24:37: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
In file included from /usr/include/c++/10/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:45,
                 from /usr/include/c++/10/ext/pb_ds/detail/container_base_dispatch.hpp:90,
                 from /usr/include/c++/10/ext/pb_ds/assoc_container.hpp:48,
                 from Main.cpp:6:
Main.cpp: In function 'bool test_students(std::vector<bool>&)':
Main.cpp:25:23: warning: comparison of integer expressions of different signedness: 'std::vector<bool>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   25 |     assert(msk.size() == N);
      |            ~~~~~~~~~~~^~~~
Main.cpp: At global scope:
Main.cpp:38:28: warning: bad option '-f O2' to attribute 'optimize' [-Wattributes]
   38 | vector<bool> find_positive() {
      |                            ^
Main.cpp:38:28: warning: bad option '-f O3' to attribute 'optimize' [-Wattributes]
Main.cpp:38:28: warning: bad option '-f Ofast' to attribute 'optimize' [-Wattributes]
Main.cpp:38:28: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
Main.cpp:49:10: warning: bad option '-f O2' to attribute 'optimize' [-Wattributes]
   49 | int main() {
      |          ^
Main.cpp:49:10: warning: bad option '-f O3' to attribute 'optimize' [-Wattributes]
Main.cpp:49:10: warning: bad option '-f Ofast' to attribute 'optimize' [-Wattributes]
Main.cpp:49:10: warning: bad option '-f unroll-loops' to attribute 'optimize' [-Wattributes]
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...