10291 | 2024-03-30 10:33:48 | 111 | Pletykálkodás | cpp17 | Wrong answer 0/100 | 54ms | 6444 KiB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N,M;
cin>>N>>M;
vector<vector<int>>g(N+1);
vector<pair<int,int>>e;
for(int i=0;i<M;i++){
int a,b;
cin>>a>>b;
g[a].push_back(b);
g[b].push_back(a);
e.emplace_back(a,b);
}
vector<tuple<int,int,int,int>>c;
for(int i=1;i<=N;i++){
vector<int>v(N+1);
v[i]=-1;
for(int j:g[i]){
v[j]=-1;
}
for(int j:g[i]){
for(int k:g[j]){
if(v[k]<0){
continue;
}
if(v[k]>0){
c.emplace_back(i,k,j,v[k]);
continue;
}
v[k]=j;
}
}
}
cout<<c.size()<<endl;
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 3ms | 2108 KiB | ||||
2 | Wrong answer | 3ms | 2236 KiB | ||||
3 | Wrong answer | 4ms | 2624 KiB | ||||
subtask2 | 0/9 | ||||||
4 | Wrong answer | 2ms | 2460 KiB | ||||
5 | Wrong answer | 2ms | 2456 KiB | ||||
6 | Wrong answer | 3ms | 2544 KiB | ||||
subtask3 | 0/13 | ||||||
7 | Wrong answer | 14ms | 3988 KiB | ||||
8 | Wrong answer | 17ms | 4064 KiB | ||||
9 | Wrong answer | 19ms | 3724 KiB | ||||
subtask4 | 0/16 | ||||||
10 | Wrong answer | 14ms | 4456 KiB | ||||
11 | Wrong answer | 14ms | 4868 KiB | ||||
12 | Wrong answer | 14ms | 4840 KiB | ||||
subtask5 | 0/25 | ||||||
13 | Wrong answer | 3ms | 3224 KiB | ||||
14 | Wrong answer | 3ms | 3360 KiB | ||||
15 | Wrong answer | 3ms | 3312 KiB | ||||
16 | Wrong answer | 3ms | 3320 KiB | ||||
17 | Wrong answer | 3ms | 3376 KiB | ||||
18 | Wrong answer | 3ms | 3500 KiB | ||||
19 | Wrong answer | 3ms | 3580 KiB | ||||
subtask6 | 0/13 | ||||||
20 | Wrong answer | 4ms | 3860 KiB | ||||
21 | Wrong answer | 4ms | 3864 KiB | ||||
22 | Wrong answer | 4ms | 3920 KiB | ||||
23 | Wrong answer | 8ms | 4524 KiB | ||||
24 | Wrong answer | 6ms | 4132 KiB | ||||
25 | Wrong answer | 4ms | 4144 KiB | ||||
26 | Wrong answer | 6ms | 4180 KiB | ||||
subtask7 | 0/24 | ||||||
27 | Wrong answer | 23ms | 6072 KiB | ||||
28 | Wrong answer | 21ms | 6444 KiB | ||||
29 | Wrong answer | 21ms | 6316 KiB | ||||
30 | Wrong answer | 32ms | 6132 KiB | ||||
31 | Wrong answer | 37ms | 5608 KiB | ||||
32 | Wrong answer | 41ms | 5300 KiB | ||||
33 | Wrong answer | 48ms | 5292 KiB | ||||
34 | Wrong answer | 54ms | 5148 KiB | ||||
35 | Wrong answer | 35ms | 5604 KiB | ||||
36 | Wrong answer | 39ms | 5304 KiB | ||||
37 | Wrong answer | 46ms | 5288 KiB |