Submission #331707

# Submission time Handle Problem Language Result Execution time Memory
331707 2020-11-29T16:12:34 Z Trys_Like_Buffalo Potemkin cycle (CEOI15_indcyc) C++11
30 / 100
1000 ms 4460 KB
#include <bits/stdc++.h>
using namespace std;
//FILE *fi=freopen("1.txt","r",stdin);
//FILE *fi=freopen("1.inp","r",stdin);
//FILE *fo=freopen("1.out","w",stdout);
const int Maxn = 1010;
int a[Maxn][Maxn];
int n,m;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cin>>n>>m;
    for(int i = 1;i<=m;i++)
    {
        int u,v;
        cin>>u>>v;
        a[u][v] = 1;
        a[v][u] = 1;
    }
    for(int u = 1;u<=n;u++)
    {
        for(int v = 1;v<=n;v++)
        {
            if(!a[u][v] || u == v)
                continue;
            for(int k = 1;k<=n;k++)
            {
                if(!a[v][k] || a[u][k] || k == u || k == v)
                    continue;
                for(int t = 1;t<=n;t++)
                {
                    if(!a[k][t] || a[v][t] || !a[u][t] || t == k || t == u || t == v)
                        continue;
                    cout<<u<<" "<<v<<" "<<k<<" "<<t<<"\n";
                    return 0;
                }
            }
        }
    }
    cout<<"no";
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 492 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 748 KB Expected integer, but "no" found
# Verdict Execution time Memory Grader output
1 Incorrect 18 ms 748 KB Expected integer, but "no" found
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 33 ms 1588 KB Output is correct
2 Incorrect 36 ms 1664 KB Expected integer, but "no" found
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 200 ms 1516 KB Expected integer, but "no" found
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1057 ms 4460 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1040 ms 4332 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 157 ms 2156 KB Expected integer, but "no" found
2 Halted 0 ms 0 KB -