Home
Tasks
School selections
Regionals
Nationals & OIS
Tasks by technique
Tasks by contest
Tasks by year
Ranking
Algobadge
Forum
Italiano
Italiano
English
English
Polski
Polski
Deutsch
Deutsch (beta)
Español
Español (beta)
Français
Français (beta)
Română
Română (beta)
Magyar
Magyar (beta)
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
Statement
Attachments
Tags
Stats
Submit
Submissions
Help
Forum posts
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(...
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...
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,...
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; }
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