# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
164614 | 2019-11-22T08:01:37 Z | AKaan37 | Star triangles (IZhO11_triangle) | C++17 | 563 ms | 15608 KB |
//Sani buyuk Osman Pasa Plevneden cikmam diyor. //FatihSultanMehmedHan //Abdulhamid Han //Bismillahirrahmanirrahim //█▀█─█──█──█▀█─█─█ //█▄█─█──█──█▄█─█▄█ //█─█─█▄─█▄─█─█─█─█ #pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; typedef long long lo; typedef pair< lo,lo > PII; #define fi first #define se second #define mp make_pair #define pb push_back #define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define FOR for(lo i=1;i<=n;i++) #define mid ((start+end)/2) #define ort ((bas+son)/2) const lo MAX = -1000000000000000000; const lo MIN = 1000000000000000000; const lo inf = 1000000000; const lo KOK = 100000; const lo LOG = 30; const lo li = 500005; const lo mod = 1000000007; lo n,m,b[li],a[li],k,flag,t,x[li],y[li]; lo cev; string s; map<lo,lo> xk,yk; vector<lo> v; int main(void){ //~ freopen("triangles.in","r",stdin); //~ freopen("triangles.out","w",stdout); scanf("%lld",&n); FOR{ scanf("%lld %lld",&x[i],&y[i]); xk[x[i]]++;yk[y[i]]++; } FOR{ cev+=(xk[x[i]]-1)*(yk[y[i]]-1); } printf("%lld\n",cev); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 376 KB | Output is correct |
5 | Correct | 2 ms | 376 KB | Output is correct |
6 | Correct | 2 ms | 376 KB | Output is correct |
7 | Correct | 2 ms | 504 KB | Output is correct |
8 | Correct | 2 ms | 376 KB | Output is correct |
9 | Correct | 2 ms | 376 KB | Output is correct |
10 | Correct | 2 ms | 376 KB | Output is correct |
11 | Correct | 3 ms | 376 KB | Output is correct |
12 | Correct | 11 ms | 1272 KB | Output is correct |
13 | Correct | 10 ms | 1400 KB | Output is correct |
14 | Correct | 16 ms | 1764 KB | Output is correct |
15 | Correct | 187 ms | 8028 KB | Output is correct |
16 | Correct | 174 ms | 8412 KB | Output is correct |
17 | Correct | 186 ms | 8012 KB | Output is correct |
18 | Correct | 181 ms | 8024 KB | Output is correct |
19 | Correct | 563 ms | 14776 KB | Output is correct |
20 | Correct | 317 ms | 12072 KB | Output is correct |
21 | Correct | 495 ms | 15608 KB | Output is correct |
22 | Correct | 482 ms | 15608 KB | Output is correct |