QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#324210 | #8230. Submissions | ucup-team112# | AC ✓ | 347ms | 67024kb | C++20 | 12.1kb | 2024-02-10 16:59:42 | 2024-02-10 16:59:43 |
Judging History
answer
//#define _GLIBCXX_DEBUG
//#pragma GCC target("avx2")
//#pragma GCC optimize("O3")
//#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include <debug_print.hpp>
#define OUT(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__)
#else
#define OUT(...) (static_cast<void>(0))
#endif
#define endl '\n'
#define lfs cout<<fixed<<setprecision(15)
#define ALL(a) (a).begin(),(a).end()
#define ALLR(a) (a).rbegin(),(a).rend()
#define UNIQUE(a) (a).erase(unique((a).begin(),(a).end()),(a).end())
#define spa << " " <<
#define fi first
#define se second
#define MP make_pair
#define MT make_tuple
#define PB push_back
#define EB emplace_back
#define rep(i,n,m) for(ll i = (n); i < (ll)(m); i++)
#define rrep(i,n,m) for(ll i = (ll)(m) - 1; i >= (ll)(n); i--)
using ll = long long;
using ld = long double;
const ll MOD1 = 1e9+7;
const ll MOD9 = 998244353;
const ll INF = 1e18;
using P = pair<ll, ll>;
template<typename T> using PQ = priority_queue<T>;
template<typename T> using QP = priority_queue<T,vector<T>,greater<T>>;
template<typename T1, typename T2>bool chmin(T1 &a,T2 b){if(a>b){a=b;return true;}else return false;}
template<typename T1, typename T2>bool chmax(T1 &a,T2 b){if(a<b){a=b;return true;}else return false;}
ll median(ll a,ll b, ll c){return a+b+c-max({a,b,c})-min({a,b,c});}
void ans1(bool x){if(x) cout<<"Yes"<<endl;else cout<<"No"<<endl;}
void ans2(bool x){if(x) cout<<"YES"<<endl;else cout<<"NO"<<endl;}
void ans3(bool x){if(x) cout<<"Yay!"<<endl;else cout<<":("<<endl;}
template<typename T1,typename T2>void ans(bool x,T1 y,T2 z){if(x)cout<<y<<endl;else cout<<z<<endl;}
template<typename T1,typename T2,typename T3>void anss(T1 x,T2 y,T3 z){ans(x!=y,x,z);};
template<typename T>void debug(const T &v,ll h,ll w,string sv=" "){for(ll i=0;i<h;i++){cout<<v[i][0];for(ll j=1;j<w;j++)cout<<sv<<v[i][j];cout<<endl;}};
template<typename T>void debug(const T &v,ll n,string sv=" "){if(n!=0)cout<<v[0];for(ll i=1;i<n;i++)cout<<sv<<v[i];cout<<endl;};
template<typename T>void debug(const vector<T>&v){debug(v,v.size());}
template<typename T>void debug(const vector<vector<T>>&v){for(auto &vv:v)debug(vv,vv.size());}
template<typename T>void debug(stack<T> st){while(!st.empty()){cout<<st.top()<<" ";st.pop();}cout<<endl;}
template<typename T>void debug(queue<T> st){while(!st.empty()){cout<<st.front()<<" ";st.pop();}cout<<endl;}
template<typename T>void debug(deque<T> st){while(!st.empty()){cout<<st.front()<<" ";st.pop_front();}cout<<endl;}
template<typename T>void debug(PQ<T> st){while(!st.empty()){cout<<st.top()<<" ";st.pop();}cout<<endl;}
template<typename T>void debug(QP<T> st){while(!st.empty()){cout<<st.top()<<" ";st.pop();}cout<<endl;}
template<typename T>void debug(const set<T>&v){for(auto z:v)cout<<z<<" ";cout<<endl;}
template<typename T>void debug(const multiset<T>&v){for(auto z:v)cout<<z<<" ";cout<<endl;}
template<typename T,size_t size>void debug(const array<T, size> &a){for(auto z:a)cout<<z<<" ";cout<<endl;}
template<typename T,typename V>void debug(const map<T,V>&v){for(auto z:v)cout<<"["<<z.first<<"]="<<z.second<<",";cout<<endl;}
template<typename T>vector<vector<T>>vec(ll x, ll y, T w){vector<vector<T>>v(x,vector<T>(y,w));return v;}
vector<ll>dx={1,-1,0,0,1,1,-1,-1};vector<ll>dy={0,0,1,-1,1,-1,1,-1};
template<typename T>vector<T> make_v(size_t a,T b){return vector<T>(a,b);}
template<typename... Ts>auto make_v(size_t a,Ts... ts){return vector<decltype(make_v(ts...))>(a,make_v(ts...));}
template<typename T1, typename T2>ostream &operator<<(ostream &os, const pair<T1, T2>&p){return os << "(" << p.first << "," << p.second << ")";}
template<typename T>ostream &operator<<(ostream &os, const vector<T> &v){os<<"[";for(auto &z:v)os << z << ",";os<<"]"; return os;}
template<typename T>void rearrange(vector<int>&ord, vector<T>&v){
auto tmp = v;
for(int i=0;i<tmp.size();i++)v[i] = tmp[ord[i]];
}
template<typename Head, typename... Tail>void rearrange(vector<int>&ord,Head&& head, Tail&&... tail){
rearrange(ord, head);
rearrange(ord, tail...);
}
template<typename T> vector<int> ascend(const vector<T>&v){
vector<int>ord(v.size());iota(ord.begin(),ord.end(),0);
sort(ord.begin(),ord.end(),[&](int i,int j){return make_pair(v[i],i)<make_pair(v[j],j);});
return ord;
}
template<typename T> vector<int> descend(const vector<T>&v){
vector<int>ord(v.size());iota(ord.begin(),ord.end(),0);
sort(ord.begin(),ord.end(),[&](int i,int j){return make_pair(v[i],-i)>make_pair(v[j],-j);});
return ord;
}
template<typename T> vector<T> inv_perm(const vector<T>&ord){
vector<T>inv(ord.size());
for(int i=0;i<ord.size();i++)inv[ord[i]] = i;
return inv;
}
ll FLOOR(ll n,ll div){assert(div>0);return n>=0?n/div:(n-div+1)/div;}
ll CEIL(ll n,ll div){assert(div>0);return n>=0?(n+div-1)/div:n/div;}
ll digitsum(ll n){ll ret=0;while(n){ret+=n%10;n/=10;}return ret;}
ll modulo(ll n,ll d){return (n%d+d)%d;};
template<typename T>T min(const vector<T>&v){return *min_element(v.begin(),v.end());}
template<typename T>T max(const vector<T>&v){return *max_element(v.begin(),v.end());}
template<typename T>T acc(const vector<T>&v){return accumulate(v.begin(),v.end(),T(0));};
template<typename T>T reverse(const T &v){return T(v.rbegin(),v.rend());};
//mt19937 mt(chrono::steady_clock::now().time_since_epoch().count());
int popcount(ll x){return __builtin_popcountll(x);};
int poplow(ll x){return __builtin_ctzll(x);};
int pophigh(ll x){return 63 - __builtin_clzll(x);};
template<typename T>T poll(queue<T> &q){auto ret=q.front();q.pop();return ret;};
template<typename T>T poll(priority_queue<T> &q){auto ret=q.top();q.pop();return ret;};
template<typename T>T poll(QP<T> &q){auto ret=q.top();q.pop();return ret;};
template<typename T>T poll(stack<T> &s){auto ret=s.top();s.pop();return ret;};
ll MULT(ll x,ll y){if(LLONG_MAX/x<=y)return LLONG_MAX;return x*y;}
ll POW2(ll x, ll k){ll ret=1,mul=x;while(k){if(mul==LLONG_MAX)return LLONG_MAX;if(k&1)ret=MULT(ret,mul);mul=MULT(mul,mul);k>>=1;}return ret;}
ll POW(ll x, ll k){ll ret=1;for(int i=0;i<k;i++){if(LLONG_MAX/x<=ret)return LLONG_MAX;ret*=x;}return ret;}
std::ostream &operator<<(std::ostream &dest, __int128_t value) {
std::ostream::sentry s(dest);
if (s) {
__uint128_t tmp = value < 0 ? -value : value;
char buffer[128];
char *d = std::end(buffer);
do {
--d;
*d = "0123456789"[tmp % 10];
tmp /= 10;
} while (tmp != 0);
if (value < 0) {
--d;
*d = '-';
}
int len = std::end(buffer) - d;
if (dest.rdbuf()->sputn(d, len) != len) {
dest.setstate(std::ios_base::badbit);
}
}
return dest;
}
namespace converter{
int dict[500];
const string lower="abcdefghijklmnopqrstuvwxyz";
const string upper="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const string digit="0123456789";
const string digit1="123456789";
void regi_str(const string &t){
for(int i=0;i<t.size();i++){
dict[t[i]]=i;
}
}
void regi_int(const string &t){
for(int i=0;i<t.size();i++){
dict[i]=t[i];
}
}
vector<int>to_int(const string &s,const string &t){
regi_str(t);
vector<int>ret(s.size());
for(int i=0;i<s.size();i++){
ret[i]=dict[s[i]];
}
return ret;
}
vector<int>to_int(const string &s){
auto t=s;
sort(t.begin(),t.end());
t.erase(unique(t.begin(),t.end()),t.end());
return to_int(s,t);
}
vector<vector<int>>to_int(const vector<string>&s,const string &t){
regi_str(t);
vector<vector<int>>ret(s.size(),vector<int>(s[0].size()));
for(int i=0;i<s.size();i++){
for(int j=0;j<s[0].size();j++){
ret[i][j]=dict[s[i][j]];
}
}
return ret;
}
vector<vector<int>>to_int(const vector<string>&s){
string t;
for(int i=0;i<s.size();i++){
t+=s[i];
}
sort(t.begin(),t.end());t.erase(unique(t.begin(),t.end()),t.end());
return to_int(s,t);
}
string to_str(const vector<int>&s,const string &t){
regi_int(t);
string ret;
for(auto z:s)ret+=dict[z];
return ret;
}
vector<string> to_str(const vector<vector<int>>&s,const string &t){
regi_int(t);
vector<string>ret(s.size());
for(int i=0;i<s.size();i++){
for(auto z:s[i])ret[i]+=dict[z];
}
return ret;
}
}
template< typename T = int >
struct edge {
int to;
T cost;
int id;
edge():to(-1),id(-1){};
edge(int to, T cost = 1, int id = -1):to(to), cost(cost), id(id){}
operator int() const { return to; }
};
template<typename T>
using Graph = vector<vector<edge<T>>>;
template<typename T>
Graph<T>revgraph(const Graph<T> &g){
Graph<T>ret(g.size());
for(int i=0;i<g.size();i++){
for(auto e:g[i]){
int to = e.to;
e.to = i;
ret[to].push_back(e);
}
}
return ret;
}
template<typename T>
Graph<T> readGraph(int n,int m,int indexed=1,bool directed=false,bool weighted=false){
Graph<T> ret(n);
for(int es = 0; es < m; es++){
int u,v;
T w=1;
cin>>u>>v;u-=indexed,v-=indexed;
if(weighted)cin>>w;
ret[u].emplace_back(v,w,es);
if(!directed)ret[v].emplace_back(u,w,es);
}
return ret;
}
template<typename T>
Graph<T> readParent(int n,int indexed=1,bool directed=true){
Graph<T>ret(n);
for(int i=1;i<n;i++){
int p;cin>>p;
p-=indexed;
ret[p].emplace_back(i);
if(!directed)ret[i].emplace_back(p);
}
return ret;
}
void solve(){
ll res=0,buf=0;
bool judge = true;
int m;cin>>m;
map<string,map<char,vector<pair<int,int>>>>h;
map<string,pair<int,int>>sc;
map<pair<int,int>,vector<string>>vc;
while(m--){
string c;cin>>c;
char p;cin>>p;
int t;cin>>t;
string s;cin>>s;
int r=1;
if(s=="rejected")r=0;
h[c][p].EB(t,r);
}
map<string,vector<pair<int,int>>>mv;
int n=0;//at least 1
bool check=false;
for(auto &[name,mp]:h){
// 最初のacceptをrejectにする or 最初のrejectをacceptにする or 最後のrejectをacceptにする
for(auto &[prob,res]:mp){
int ac=0,pena=0,spena=0;
vector<pair<int,int>>cand;
for(auto z:res){
if(ac==0&&!z.se)cand.EB(1,pena+z.fi);
if(ac==1&&z.se)cand.EB(1,spena+z.fi+20);
if(ac==0&&!z.se)pena+=20;
if(!z.se)spena+=20;
if(ac==0&&z.se)pena+=z.fi;
ac+=z.se;
}
if(ac==1)cand.EB(0,0);
if(ac==0)pena=0;
chmin(ac,1);
for(auto &z:cand){
z.fi-=ac;
z.se-=pena;
}
if(!check){
check=true;
cand.EB(0,0);
}
for(auto &z:cand)mv[name].EB(z.fi,z.se);
sc[name].fi+=ac;
sc[name].se+=pena;
}
auto p=sc[name];
vc[MP(-p.fi,p.se)].EB(name);
if(p.fi>=1)n++;
}
set<string>win;
map<pair<int,int>,string>exc; //こいつ以外金メダル
OUT(sc);
for(auto &[name,mp]:mv){
auto ssp=sc[name];
for(auto z:mp){
auto sp=ssp;
sp.fi+=z.fi,sp.se+=z.se;
int waku=CEIL(n-(ssp.fi!=0)+(sp.fi!=0),10);
chmin(waku,35);
int now=0;
//OUT(name,waku,z,exc);
bool pass=false;
for(auto &[np,vs]:vc){
bool in=(np.fi==-ssp.fi&&np.se==ssp.se);
int sz=vs.size()-(np.fi==-ssp.fi&&np.se==ssp.se);
if(MP(np.fi,np.se)>MP(-sp.fi,sp.se)){
pass=true;
now++;
win.insert(name);
if(now>=waku)break;
}
else if(MP(np.fi,np.se)==MP(-sp.fi,sp.se)){
win.insert(name);
sz++;
}
if(now+sz>=waku){
//OUT(now,sz,waku,np,vs);
if(!in||(exc.count(np)&&exc[np]!=name))exc[np]="-#!?";
else exc[np]=name;
break;
}
else{
for(auto nn:vs)if(nn!=name)win.insert(nn);
}
now+=sz;
}
}
}
//OUT(exc);
for(auto z:exc){
for(auto vs:vc[z.fi]){
if(vs!=z.se){
win.insert(vs);
}
}
}
cout<<win.size()<<endl;
vector ww(ALL(win));
debug(ww);
}
int main(){
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
ll res=0,buf=0;
bool judge = true;
int T = 1;
cin>>T;
while(T--){
solve();
}
return 0;
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3592kb
input:
2 5 TSxingxing10 G 0 rejected TSxingxing10 B 83 accepted aoliaoligeiliao J 98 accepted TS1 J 118 accepted TS1 B 263 accepted 12 AllWayTheNorth A 0 rejected YaoYaoLingXian Y 10 accepted XuejunXinyoudui1 X 200 rejected XuejunXinyoudui1 X 200 accepted LetItRot L 215 accepted AllWayTheNorth W 250 accept...
output:
2 TS1 TSxingxing10 4 AllWayTheNorth ImYourFan LetItRot XuejunXinyoudui1
result:
ok 2 test cases ok. (2 test cases)
Test #2:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
2 2 jiangly_fan A 1 accepted jiangly B 23 accepted 3 conqueror_of_tourist A 1 accepted conqueror_of_tourist A 2 accepted tourist B 23 accepted
output:
2 jiangly jiangly_fan 1 conqueror_of_tourist
result:
ok 2 test cases ok. (2 test cases)
Test #3:
score: 0
Accepted
time: 1ms
memory: 3664kb
input:
2 13 A A 1 accepted A X 1 accepted K K 1 rejected B B 2 accepted C C 2 accepted D D 2 accepted E E 2 accepted F F 2 accepted G G 2 accepted H H 2 accepted I I 2 accepted J J 2 accepted K K 2 rejected 12 A A 1 accepted A X 1 accepted B B 2 accepted C C 2 accepted D D 2 accepted E E 2 accepted F F 2 a...
output:
11 A B C D E F G H I J K 1 A
result:
ok 2 test cases ok. (2 test cases)
Test #4:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
2 11 A A 1 accepted B B 1 accepted C C 2 accepted D D 2 accepted E E 2 accepted F F 2 accepted G G 2 accepted H H 2 accepted I I 2 accepted J J 2 accepted K K 2 accepted 12 A A 1 accepted A X 1 accepted K K 1 rejected B B 2 accepted C C 2 accepted D D 2 accepted E E 2 accepted F F 2 accepted G G 2 a...
output:
2 A B 2 A K
result:
ok 2 test cases ok. (2 test cases)
Test #5:
score: 0
Accepted
time: 72ms
memory: 3680kb
input:
100000 1 M3JytWoaEXxkACy_mBAQ R 111 accepted 1 sQ O 151 accepted 1 JinbrcS58gNEE5yTSkT B 140 accepted 1 cklwBY V 243 accepted 1 v_o42YmvEKFwy Q 260 rejected 1 ftQVK8S_um22w K 265 accepted 1 _bQBeFeDpYQhvZcLf9l3 Z 147 accepted 1 KvDcEAIDN A 75 rejected 1 H3MUK6 A 101 rejected 1 gxYo_oCFn2J8aIben U 54...
output:
1 M3JytWoaEXxkACy_mBAQ 1 sQ 1 JinbrcS58gNEE5yTSkT 1 cklwBY 1 v_o42YmvEKFwy 1 ftQVK8S_um22w 1 _bQBeFeDpYQhvZcLf9l3 1 KvDcEAIDN 1 H3MUK6 1 gxYo_oCFn2J8aIben 1 _isnlUGK0ddI 1 BERcVjyCp 1 6In2do_50ylch 1 f0r3SXc6brMjT 1 7njYOapSwvogA 1 x 1 y1w3KvxylfxwprRBYw 1 aGedzS 1 iPo0GDhIF 1 4Vf5RXaTmySkFcXgHLOh 1...
result:
ok 100000 test cases ok. (100000 test cases)
Test #6:
score: 0
Accepted
time: 68ms
memory: 3832kb
input:
10000 42 Bzs0PiQMXGZ5rRZ_2D G 2 accepted 9XtB_VIfbRRL E 11 accepted FVJL M 13 rejected a S 19 accepted tsd Z 20 rejected MyCqVEg1ONjZ U 22 accepted 6SgZMn N 51 rejected Qua1Pti3vKhyQKDUm P 54 accepted i29 M 63 accepted zPqu D 68 rejected xx2yiu6x C 71 rejected fYuK1KNkuyO5HRCq L 76 rejected tXWpYVqj...
output:
4 Qua1Pti3vKhyQKDUm fYuK1KNkuyO5HRCq tsd xiLm0TUOF3T 2 JP t3 2 77sgqpbTIr_Zt1 fhYPGC8W82NwJTQL 2 3BQ pVWDEz 2 buCeoOotAkV8DaFD6 tg 1 UkXQ3iaNJ 2 ALTqPt7JUSLrl vwfw 1 QTEzV6tp 3 4e1l0pO8eFjZwkDo 9cy_y_RNRwex8j7224hz wJlbqIU 2 6mbCu5zA eiuF7a_ 1 xy6QBr8ECi 3 PezeyUurYoz7N1iGU _Yej1PrINtydmOudwoO ldaKL...
result:
ok 10000 test cases ok. (10000 test cases)
Test #7:
score: 0
Accepted
time: 63ms
memory: 3692kb
input:
10000 27 bhAGFVDBjp4_Tvo U 24 accepted bhAGFVDBjp4_Tvo O 37 rejected bhAGFVDBjp4_Tvo D 40 accepted bhAGFVDBjp4_Tvo H 45 accepted bhAGFVDBjp4_Tvo B 60 rejected bhAGFVDBjp4_Tvo J 63 accepted bhAGFVDBjp4_Tvo M 81 rejected bhAGFVDBjp4_Tvo M 98 rejected bhAGFVDBjp4_Tvo D 103 rejected bhAGFVDBjp4_Tvo Q 11...
output:
1 bhAGFVDBjp4_Tvo 2 euenQ rl 1 seny 2 8zfFqdixKjh nLWe5xvBqfYkN 1 VDeEtfbb 1 9PAd7wtbCZMws6u 1 Wsfc5qold4uacAjI1y 2 NX6GLK3Nz h68cyLwQ7drM__pSJub 3 U7S8zgJhR6 sdf0IGct21OeEFJ yOgwg 1 acesvM9yT 1 2hQb 2 3twK2MJI_ P5 1 eGCz 3 39GgHUPovILESCd0 UXRu8i tLHWIEVr5i7vlKpvlP 1 20gsbZ25SsYp8 1 iLUv 2 _lFUYRDV...
result:
ok 10000 test cases ok. (10000 test cases)
Test #8:
score: 0
Accepted
time: 64ms
memory: 3836kb
input:
10000 2 vVflLovvnhJEO U 3 accepted Fg P 48 rejected 12 V9UJ5hEaWiwMq3lxwKw9 P 30 accepted CKsw M 34 rejected dCZBzKMxgQfgBDZO R 50 rejected A1R2kF N 54 rejected A1R2kF X 65 accepted HEih51ut H 68 rejected HEih51ut J 75 rejected l0MCFXNXlH6T2wT I 163 accepted A1R2kF B 180 accepted dCZBzKMxgQfgBDZO A ...
output:
1 vVflLovvnhJEO 2 A1R2kF V9UJ5hEaWiwMq3lxwKw9 4 2 5sFcoMh fLUS3NYE xgdxQ7t 2 2ra47EFC7LWzxTF2tSH S25TIbMLU5FMV6ys4 2 tczurXngUW uwm 3 DNAv Zh4tWi1QdYjTblw5 gWG1aLfP1Gk 1 qN_OnmRhGksD 1 pAJC7fTKPJjaxPP 2 Jr9Sqekor mElj5iV4wfu 1 _Z13N_OO 1 rn 1 HhjFL6Rg 1 2q 5 LjvEZmSkrsT QFFNJcyah90 eO6B_fLKDAZoY tEV...
result:
ok 10000 test cases ok. (10000 test cases)
Test #9:
score: 0
Accepted
time: 69ms
memory: 3700kb
input:
10000 4 BUqwUvN2v7co K 45 accepted fb4ykhGx9CBzWxLcGYjf F 96 rejected 3X39YaWp0LItH14Owx R 142 rejected 7JGP4qtBonRiKpsKW U 155 rejected 3 Z0cxqdpQ69NGV5wDoht X 92 rejected 1E0aicZDqPhh E 105 accepted a3fvTkSrKXqQipNGs4h K 261 rejected 6 LR6PY6OjDoSaZpT W 33 accepted Et8w1E52xfM27 Q 155 accepted LR6...
output:
1 BUqwUvN2v7co 2 1E0aicZDqPhh Z0cxqdpQ69NGV5wDoht 1 LR6PY6OjDoSaZpT 3 7f YX b 4 WqSH buFAkOkQ_F o7VPp sgpEsfgf_Fd 1 coTjuCSsnonAgjYkChE 2 GC0Lw1Di clGo2Z4AMe9Qp 2 FCCHBTUTGJTbTjEb IrJ_n_Ym 1 fkBpEQxhBl21ARSTVR 1 fQzlJS9JEIS97gIIG7p4 6 CVVvEx bLED4G7CY_M ljfPMl71hE otcG2t pqyDmprb2RmUBafc76eR togGKu7...
result:
ok 10000 test cases ok. (10000 test cases)
Test #10:
score: 0
Accepted
time: 64ms
memory: 3648kb
input:
10000 7 dBv7DiT L 42 rejected dBv7DiT P 123 accepted 7Bj2dZF6Gy7csrXYakI T 131 rejected 9KtuO O 190 accepted BxACEk Q 285 rejected BxACEk Q 291 rejected HK0pq9qsGnlkgAQT L 296 accepted 3 NQgnW3CShrFJYkKdjagN G 53 rejected ZwZCr O 261 accepted ZwZCr P 270 accepted 6 mbGQ7wcZYr9leKBCsFN Z 4 rejected 7...
output:
2 9KtuO dBv7DiT 1 ZwZCr 2 4LUVnW93OFHOl6fJOmXK 7s1bgtS 4 CZNz6k1QgLrHojbY _g2LouxyEI_BXaOYQWn pz upCvWQnHRgRSQQ 3 q t ungF4dKzJt290JMWNgeH 3 4FjAuM44Nzaz6Tc0 6mCVqSBpHVkrNZ SuBp7xLMGCHgk 1 xXqqS7r1OU 1 YEHiJvhHR8OmUWz 3 0WZFvefoPtNo BiasA1Md2ViU m 1 MzQD 2 L501za_ktc MJJ4n2rC7YHRflGzEL 1 kcQs9Clvq3t...
result:
ok 10000 test cases ok. (10000 test cases)
Test #11:
score: 0
Accepted
time: 9ms
memory: 5284kb
input:
7 110 10 A 0 accepted 0 A 100 accepted 1 A 100 accepted 2 A 100 accepted 3 A 100 accepted 4 A 100 accepted 5 A 100 accepted 6 A 100 accepted 7 A 100 accepted 8 A 100 accepted 9 A 100 accepted 0 B 100 accepted 1 B 100 accepted 2 B 100 accepted 3 B 100 accepted 4 B 100 accepted 5 B 100 accepted 6 B 10...
output:
11 0 1 10 2 3 4 5 6 7 8 9 11 0 1 10 2 3 4 5 6 7 8 9 11 0 1 10 2 3 4 5 6 7 8 9 11 0 1 100 2 3 4 5 6 7 8 9 12 0 1 10 100 2 3 4 5 6 7 8 9 36 0 1 10 11 12 13 14 15 16 17 18 19 2 20 21 22 23 24 25 26 27 28 29 3 30 31 32 33 34 35 4 5 6 7 8 9 35 0 1 10 11 12 13 14 15 16 17 18 19 2 20 21 22 23 24 25 26 27 2...
result:
ok 7 test cases ok. (7 test cases)
Test #12:
score: 0
Accepted
time: 91ms
memory: 3908kb
input:
1000 58 8VR4968BiWGrjt0 G 1 accepted KfduBOJVYor3ixLgzUo Y 5 accepted r9l9P_xyc7oagiZS0ZJ G 26 accepted PL3OrMzXRJRVskByRHHl Y 38 accepted 7wL2M4T1PWyv9rJSdzGN N 47 rejected Vu56KH6ZGwSm E 48 rejected 8VR4968BiWGrjt0 D 53 accepted SI7h8yP C 57 rejected aSVEsYSH9PJjsjSAyH N 61 accepted D3UrdM8xI S 71...
output:
5 8VR4968BiWGrjt0 PL3OrMzXRJRVskByRHHl SI7h8yP mn0iyGyqWOakTAs1Qw umqh9D 6 3A4BJULiR9S 6OSsIJ 9M EYdAeGI f22a5ba_ze2qsm2_2k uxPAbOmdBcWg64Q52 25 19Mbp 6zU 9DVkaj8vMDxLV4MVh2O_ 9sFtbGG4oMjSgmtZh D6SdnJFh6xFQlZehalkc DIt FJhecJwM JjWIyr8 OltMSo53IsdGRLoUb0 Qo8l4lQKg V XJ9p0AKseAnbt7vmR_ Zsl aaM4iPkdQ6...
result:
ok 1000 test cases ok. (1000 test cases)
Test #13:
score: 0
Accepted
time: 206ms
memory: 4920kb
input:
100 974 qG R 0 accepted k2K I 0 accepted NelrCjQd_AHSw107 D 1 accepted ybeH_JvdmCLMOGl9x K 1 accepted h3 Q 2 accepted 9qOW O 2 accepted v1IWHoW7Mkuce6qH Y 2 accepted mlypVkK5Xl1KXw3o P 2 rejected zs X 3 accepted 1Fpyq8oUYV_aNp I 3 rejected e1bM8xUh E 3 rejected myaSH0LCL4hD5BlAj F 4 rejected IJETUS2...
output:
65 0NhoPE 185RryPWmjK2h47NJax 1qXXQyXNhDyf97IT0n 2cBZ 2tougTgqY91VXB3 3f3gDxR 55IlpzN 7DHKKRDYO 9qOW DO0tQAc FJ9Y Hy551D5ZPfvBDS IJETUS2jG Io5tMwXAJlbYL2Wikqqq JSC6wpny7viIbAUq LM5B LhlGfI4XZ Ms7FjfFm NelrCjQd_AHSw107 OZv7jP6ZP1L0pmwrtfW PGbK PlD7x1RoiUUo Q3wkiZxpn13i_s64Y QGg QW QXFitGeaPT8BjI T0nx...
result:
ok 100 test cases ok. (100 test cases)
Test #14:
score: 0
Accepted
time: 264ms
memory: 12156kb
input:
10 5371 r0JLpp2hFx T 0 accepted w19l89 X 0 rejected PeEB Y 0 accepted 2MwVQe3 Y 0 accepted CarjodD8k4E K 0 accepted vNjq0LmY D 0 accepted Bvi16IvVACG3uREuoO X 0 accepted yMlDlaWPTluR1dk43nl6 A 0 rejected 4LBA3qILgaib4lrQ X 1 accepted vRSpyKVAU7e I 1 rejected 627aFcGG4zh8 Z 1 rejected FHwI U 1 accept...
output:
85 2AF3LbCAMXg 2HT7G5q_UM4CH 2YL1K5JThyVh6 2q1QkMCewAeWl 3L 3ntTBJ2G 3oyR1q 4J8yfyWPQLaYwOPbQ1c 5gGJk 61F 7Ezg6 7R 9Saa 9al As_jBpG0uR9t CgcD1 DP3Q56WAbP DdOUBy DoLs Du2Rmmj_rlgveV EpqKVhDBeo4JaEWcz7 FHjsj6oWpg72iBLgjLf FHwI FlTsTqSJ Gthf5xZXaX6rY I9Tfaeo6lTwLkgC90n IxS JH8 KwjId5DA66 LENUDmAZjz8S6Q...
result:
ok 10 test cases ok. (10 test cases)
Test #15:
score: 0
Accepted
time: 347ms
memory: 39472kb
input:
1 100000 OZeDY6m2v P 0 accepted DolcP A 0 accepted 2Z9Yd M 0 rejected Vjl F 0 accepted SPetC8_ru4S3nXJkkD C 0 rejected XhLC G 0 rejected wZvhcns7t7EaOero E 0 accepted HRqRKcO87 I 0 rejected dwfT7D H 0 rejected cxvYaN8zSMGpoa9Q9xv U 0 accepted nvXlrCa1zbx8uokfd T 0 accepted E_bbU5C9bgpD_wGo P 0 rejec...
output:
213 0I6_zoHOMIlwLEAjxGA 0hELBpU5n_QXtw 0hH 0jTK9uR3FcSB 1T 1dH9n4ucH5tDCWoaEBXl 2bAcFJDTW9 2pY7Nw 2rzxtwkikpsE 3Pokt6fwaxOe9TjlAV 4Va0Qz3xegJa1YTzfwB 4dQZ7VRS3v8lyV 4rcv 5FfAavp 5Zuy37 6CTTfzkMmnDqDIP 6r0Uc4guMCP2kZU 6rxpy_f_0 6u 72oo 7DqC__BGQC70H0v 7XG 7aO76gOH3CfOnT0vsJqh 7ibHgbbm7tvPSzrCqmo 7rhb...
result:
ok 1 test cases ok. (1 test case)
Test #16:
score: 0
Accepted
time: 11ms
memory: 6424kb
input:
1 100000 A A 0 accepted B Z 299 accepted B Z 299 accepted B A 299 rejected B A 299 rejected B A 299 rejected B A 299 rejected B A 299 rejected B A 299 rejected B A 299 rejected B A 299 rejected B A 299 rejected B A 299 rejected B A 299 rejected B A 299 rejected B A 299 rejected B A 299 rejected B A ...
output:
1 B
result:
ok 1 test cases ok. (1 test case)
Test #17:
score: 0
Accepted
time: 247ms
memory: 67024kb
input:
1 100000 qyGXWlwMuXY3212 A 20 accepted l_IeEuuLy9 A 20 accepted nlyFO0YOiDxyiNjBb A 20 accepted 8H A 20 accepted ek A 20 accepted Em63tewQVLljOUO4r A 20 accepted AHdtZtwK8debApdvxMy8 A 20 accepted l3aTB A 20 accepted vyFuSSSLTV5yP A 20 accepted uzPnnAXshwHCbl7 A 20 accepted sL A 20 accepted K099qoYV...
output:
99965 0 00 007mawglm06cPZNN7 00A 00BUQ 00FVI 00Fwie2FNFR_XzgHwXil 00ObZvqs6 00Uje 00W8Bfcyz0vDuDs_ 00Z97SPwvgLwAq9kZegU 00aDRwta 00cBeSNblKNhjdKxSz5 00drpJISUCyvYc6eBn 00eCVZJ4p 00h0eUV8p 00hoC2RgGv8Kc9ETJzn 00iNgG 00k9 00mL_J6I8FRwgMPTayq 00n6UfgiQ1vTqNHR8fh 00p9F6eBESgO_ 00x0bBx7ABaC 01 012IoZbWS4...
result:
ok 1 test cases ok. (1 test case)
Test #18:
score: 0
Accepted
time: 258ms
memory: 66208kb
input:
1 100000 xhmAFe A 20 accepted loPCkhj2qt A 20 accepted WIx A 20 accepted T3zIPb A 20 accepted xEEBg A 20 accepted Gd0_zLXNJ1l1_Zrqa2 A 20 accepted cM68n01suqhgjrBA A 20 accepted LA6 A 20 accepted AXBqy A 20 accepted VLc4yxmdrN7S A 20 accepted 6p_z1vz2 A 20 accepted wujWaUQNU0 A 20 accepted eHIPyc0l3...
output:
99965 0 00 007mawglm06cPZNN7 00A 00BUQ 00FVI 00Fwie2FNFR_XzgHwXil 00ObZvqs6 00Uje 00W8Bfcyz0vDuDs_ 00Z97SPwvgLwAq9kZegU 00aDRwta 00cBeSNblKNhjdKxSz5 00drpJISUCyvYc6eBn 00eCVZJ4p 00h0eUV8p 00hoC2RgGv8Kc9ETJzn 00iNgG 00k9 00mL_J6I8FRwgMPTayq 00n6UfgiQ1vTqNHR8fh 00p9F6eBESgO_ 00x0bBx7ABaC 01 012IoZbWS4...
result:
ok 1 test cases ok. (1 test case)
Extra Test:
score: 0
Extra Test Passed