OII logo
  • Home
    • School selections
    • Regionals
    • Nationals & OIS
    • Tasks by technique
    • Tasks by contest
    • Tasks by year
  • Ranking
  • Algobadge
  • Forum
Log in / Sign up

Pairs

Time limit: 4 sec
Memory limit: 150 MB
Input/output: file
Maximum score: 1000
Translations:
English
Uploaded on: 9 January 2016
StatementAttachmentsTagsStatsSubmitSubmissionsHelp

Forum posts

simone00's profile picture
Art Gallery Selection
...& i < points.size(); i++) same_y.push_back(points[i]); std::vector < std::pair < float,float > > c_pairs; for(int i = 0; i < same_y.size(); i++) for(int j = i+1; j < same_y.size(); j++) c_pairs.push_back(...
frakkiobello's profile picture
Problem ‘Do not gather’
...ing to count each good pair individually, but this approach is too slow because the number of "good-pairs" could be quadratic. Want you really need to do is: for each i find the smallest j such that P[j]-P...
simpatine's profile picture
Subset (Number Game) : 70/100
...9,27}, da 2, il problema si presenta quando confronta 2 e 3: 2 è divisore di 2,14,10,22,34(quindi i_pairs=5), 3 solo di 3,9,27 (quindi i_pairs=3), il programma eliminerà pertanto 3 pur non dovendolo fare,...
LorenzoFrittoli's profile picture
Aiuto “casino” 2WA
...count(h) > 0) { found = true; types[h]++; break; } } if (!found) types[hashes[0]] = 1; } // compute pairs ll tot = 0; for (auto[k,v]: types) tot += v * (v-1) / 2; cout < < tot < < endl; }
Fxby's profile picture
TLE Camera dei segreti con FFT
...= vector < T > ; tcT, size_t SZ > using AR = array < T, SZ > ; tcT > using PR = pair < T, T > ; // pairs #define mp make_pair #define f first #define s second #define sz(x) int((x).size()) // loops #defin...
Search other topics
Create new topic