제출 #319627

#제출 시각아이디문제언어결과실행 시간메모리
319627TAOwoosh콤보 (IOI18_combo)C++17
10 / 100
79 ms440 KiB
//#pragma GCC optimize ("Ofast") //#pragma GCC target ("avx,avx2") //#pragma GCC optimize ("trapv") #include <bits/stdc++.h> #include "combo.h" using namespace std; /* #define fastio ios_base::sync_with_stdio(0); cin.tie(0); cin.exceptions(cin.failbit); #define rep(i, a, b) for(lli i = a; i < (b); ++i) #define trav(a, x) for(auto& a : x) #define ff first #define ss second #define mp make_pair #define pb push_back #define all(x) (x).begin(), (x).end() #define sz(x) (lli)(x).size() #define what_is(x) cerr << #x << " is " << x << endl; #define wis cout<<endl<<"I already speak english, bitch"<<endl<<endl; typedef long long int lli; typedef vector<lli> vi; typedef pair<lli,lli> ii; typedef vector<ii> vii; typedef pair<ii,lli> iii; #define trace(args...) { string _s =#args; replace(_s.begin(), _s.end(), ',',' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args);} void err(istream_iterator<string> it){} template<typename T, typename... Args> void err(istream_iterator<string> it, T a, Args... args){ cout << *it << " : " << a << endl; err(++it, args...); } #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/trie_policy.hpp> using namespace __gnu_pbds; template <typename T, class compare> using ordered_set = tree<T, null_type, compare, rb_tree_tag, tree_order_statistics_node_update>; //usage: ordered_set< el tipo , el comparador> nombre; */ string guess_sequence(int n){ string wyn; vector<char> let={'A','B','X','Y'}; char ban; for(auto x : let){ string hol;hol+=x; if(press(hol)){ ban=x; break; } } wyn+=ban; int len=1; for(int i=1;i<n;i++){ for(auto x : let){ if(x==ban) continue; if(press(wyn+x)==len+1){ wyn+=x; len++; break; } } } return wyn; } /* int main(){ string s; s+='a'; cout<<s<<endl; return 0; } */
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...