Submission #1166734

#TimeUsernameProblemLanguageResultExecution timeMemory
1166734modwwePassword (RMI18_password)C++20
10 / 100
32 ms508 KiB
//#include "richest.h" #pragma GCC optimize("Ofast,unroll-loops") #include<bits/stdc++.h> //#define int long long #define ll long long #define down cout<<'\n'; #define debug cout<<" cucuucucuuu",down #define modwwe int t;cin>>t; while(t--) #define bit(i,j) (i>>j&1) #define sobit(a) __builtin_popcountll(a) #define task2 "top1tst" #define task "test" #define fin(x) freopen(x".inp","r",stdin) #define fou(x) freopen(x".out","w",stdout) #define pb push_back #define mask(k) (1ll<<k) #define checktime cerr << (double)clock() / CLOCKS_PER_SEC * 1000 << " ms"; using namespace std; #define getchar_unlocked getchar mt19937 rd(chrono::steady_clock::now().time_since_epoch().count()); int rand(int l,int r) { return uniform_int_distribution<int>(l,r)(rd); } void phongbeo(); const ll inf=1e9; const int mod2 = 998244353; //const int base=67; ll n, m, s1, s2, s4, s3, sf, k, s5, s6, mx, s7, s8, s9, mx2, res, dem2 = 0, dem = 0, s33, dem3, dem4, mid, l2, r2, center; ll i, s10, s12,k1,k2,k3,s11,lim,w,l,r,dem5,dem6,dem7,dem9,now,root,q,start,en,t,cost,cen; ll kk; ll el = 19; string c[26]; int query(string str); string solve(int l,int r) { if(l==r)return c[l]; int mid=l+r>>1; string lft=solve(l,mid),rgt=solve(mid+1,r); string hehe; dem=0; string kk; for(int i=0; i<lft.size(); i++) { if(dem==rgt.size()) { hehe=hehe+lft[i]; continue; } kk=""; for(int j=dem; j<rgt.size(); j++) kk=kk+rgt[j]; s2=query(hehe+lft[i]+kk); if(s2!=hehe.size()+1+kk.size()) { hehe=hehe+rgt[dem]; i--; dem++; } else { hehe=hehe+lft[i]; } } for(int j=dem; j<rgt.size(); j++) hehe=hehe+rgt[j]; return hehe; } string guess(int n, int s) { for(int j=0; j<s; j++) { string hehe; for(int i=0; i<n; i++) hehe=hehe+char('a'+j); s2=query(hehe); c[j]=""; for(int i=0; i<s2; i++)c[j]=c[j]+char('a'+j); } return solve(0,s-1); }
#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...