If you fail there, maybe you have forgotten that there could be only one person in a party at some contest. Edited by author 18.10.2009 23:32 I think, you is wrong. By your logic - in second demo test answer may be Fominykh (team contains only Fominykh) It's not true. gvsmirnov meant that you can get on input team of 1 person Edited by author 19.05.2020 20:44 Edited by author 19.05.2020 20:44 I'm write on Python. Can anybody help me with this test? Why WA4 ??? give me some test please In this problem, are the surnames Rubinchik & RuBinchik name the same person? Who knows what is the test 23 ? I cannat come up with new test that I missed. Can anybody help me please ? I've found it. The names of the contest participants are not sorted in alphabetical order even though it should be sorted as stated. If your program uses that fact you don't pass the test 23. I hope it will help somebody !!! 1 2 Kantorov Rubinchik 100 10 1 Rubinchik 20 I think it "Win Rubinchik" because team "Kantorov Efremov Rubinchik" is not played at all. The phrase "If, for ANY choice of the third member, Team.GOV will be disqualified,..." is incorrect, it should read "If, for EVERY choice of the third member, Team.GOV will be disqualified,...". In the first sample input, candidate 'Pervukhin' would lead to disqualification, and therefore the result should be 'Fail', according to the description. This helps me: 1# 1 2 Fominykh Kantorov 101 666 1 Fominykh 100 Answer: Win Fominykh this is strange :) Edited by author 29.12.2010 00:07 why we need re and rk? 6 3 Efremov Kantorov Rubinchik 3 Efremov Kantorov Fominykh 3 Efremov Kantorov Kokovin 3 Burmistrov Efremov Kantorov 3 Efremov Kantorov Pervukhin 2 Kantorov Pervukhin 500 10 6 Fominykh 200 Komarov 34 Pervukhin 250 Golubev 23 Soboleva 50 Gein 50 May be this will help you to understand! What is the right answer? Is the right answer -"Soboleva" ? Edited by author 20.10.2009 11:52 Yes! Then why wa3?? Edited by author 20.10.2009 12:00 May be because you have another mistake! :) 1# 1 3 Efremov Fominykh Kantorov 99 666 1 Fominykh 100 Win Fominykh 2# 1 2 Fominykh Kantorov 99 666 1 Fominykh 100 Win Fominykh #include <limits> #include <fstream> #include <algorithm> #include <set> #include <sstream> #include <string> #include <vector> #include <cmath> #include <time.h> #include <cmath> #define fori(i,n) for(int i=0;i<n;i++) #define for1(i,n) for(int i=1;i<=n;i++) #define forbi(i,a,b) for(int i = a; i<=b; i++) #define len(v) (int((v).size())) #define vi vector<int> #define vvi vector<vi > #define sz(v) (int)v.size() #define mmin(a,b,c) min(a,min(b,c)) #define sqr(x) ((x)*(x)) #define all(v) v.begin(),v.end() #define inf 987654321 #define mmax(a,b,c) max(a,max(b,c)) #define ii pair<int,int> #define si pair<int,string> #define sii vector<si > #define vii vector<ii > #define vvii vector<vii > const double pi = acos(0.0)*2; const double eps = 1e-7; #define mp(a,b) make_pair(a,b) using namespace std; #ifndef ONLINE_JUDGE ifstream cin("input.txt"); ofstream cout("output.txt"); #else #include <iostream> #endif set <string> Q; set <string> P; void main() { int n,m,k,x,y,z; string X; cin>>n; fori(i,n) { cin>>k; if (k==3){ cin>>X; Q.insert(X); cin>>X; Q.insert(X); cin>>X; Q.insert(X); } if (k==2){ cin>>X; P.insert(X); cin>>X; P.insert(X); } } cin>>x>>y; cin>>m; sii V; fori(i,m) { cin>>X>>k; V.push_back(mp(k,X)); } sort(V.rbegin(),V.rend()); si M,Z; M=mp(0,""); Z=mp(0,"");
fori(i,m) { if (Q.find(V[i].second)==Q.end() && V[i].first>M.first) { M=mp(V[i].first+x+y,V[i].second); }
} fori(i,m) { if (P.find(V[i].second)==P.end() && V[i].first>Z.first) { Z=mp(V[i].first+y,V[i].second); } } if (M.first==0 && Z.first==0) { cout<<"Fail"; return; } if (M.first>Z.first) cout<<"Win"<<endl<<M.second; else cout<<"Win"<<endl<<Z.second;
} Edited by author 22.10.2009 02:16 Can you tell me some tips on test12? thanks. try to check you read function (Efremov EfremovA) who know what can it be?? Please ask anybody? why can be wrong answer on the first test? |
|