Submission #973875

# Submission time Handle Problem Language Result Execution time Memory
973875 2024-05-02T12:12:26 Z AtabayRajabli Monthly railway pass (LMIO18_menesinis_bilietas) C++17
6 / 100
71 ms 9620 KB
#include <bits/stdc++.h>
#define int ll
#define all(v) v.begin(), v.end()
 
// author : a1abay
 
using namespace std;
 
typedef long long ll;
typedef long double ld;
const int sz = 5e5 + 5;
const int inf = 1e9 + 7;
 
int n, m, u, v;
int d[sz];
char c;

signed main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    
    cin >> n >> m;
    for(int i = 1; i <= m; i++)
    {
        cin >> u >> v >> c;
        d[u]++;
        d[v]++;
    }
    
    int cnt = 0;
    for(int i = 1; i <= n; i++) cnt += d[i] == n - 1;
    cout << cnt;
}
# Verdict Execution time Memory Grader output
1 Incorrect 65 ms 6224 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 49 ms 7016 KB Output is correct
7 Correct 71 ms 9620 KB Output is correct
8 Correct 2 ms 600 KB Output is correct
9 Correct 4 ms 860 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Incorrect 0 ms 348 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -