ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1700. Awakening

How to pass TL. test #10
Posted by tanas 9 Apr 2009 18:12
I used such variables:
map<string,int> id;
set<string> list[1003];
map<string,int> mp;
vector<string> res;
but got TL test 10. Can i get AC with same solution?
Re: How to pass TL. test #10
Posted by svr 5 May 2009 13:46
Yes if instead string use
struct{
int num;
int row;
int poz1;
int poz2;
};
to have deal with segments of char S[1000][125]
Re: How to pass TL. test #10
Posted by Vladimir Plyashkun [USU] 28 Jan 2014 20:57
to pass test 10 you must do
1) compare hash codes instead of string compare
2) use vectors+sort. In this case vector is way faster than std::set
3) fast I/O.
4) fast list intersection
good luck!