Submission #112584
Source Code Expand
#include <stdlib.h> #include <stdio.h> #define NUM 10000 #if 1 int main() { int n, m; int data[NUM*2]; int tmp[NUM]; int nt; int max = 1; scanf("%d %d", &n, &m); for(int i = 0; i < m*2; i += 2) { scanf("%d %d", &data[i], &data[i+1]); } for(int piv = 1; piv <=n ; ++piv) { nt = 0; for(int i = 0; i < m*2; i+=2) { if(piv == data[i]) { tmp[nt] = data[i+1]; ++nt; } else if(piv == data[i+1]) { tmp[nt] = data[i]; ++nt; } } int min = nt; int ntt; for(int i = 0; i < nt; ++i) { ntt = 1; int tpiv = tmp[i]; for(int j = 0; j < m*2; j += 2) { if(tpiv == data[j]) { int ttt = data[j+1]; for(int k = 0; k < nt; ++k) if(ttt = tmp[k]) { ++ntt; break; } } else if(tpiv == data[j+1]) { int ttt = data[j]; for(int k = 0; k < nt; ++k) if(ttt = tmp[k]) { ++ntt; break; } } } if(min > ntt) min = ntt; } if(max < min) max = min; } printf("%d\n", max); } #endif
Submission Info
Submission Time | |
---|---|
Task | A - 正直者 |
User | x0unnamed |
Language | C++ (G++ 4.6.4) |
Score | 0 |
Code Size | 1066 Byte |
Status | TLE |
Exec Time | 2033 ms |
Memory | 820 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:13:24: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] ./Main.cpp:15:39: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
Judge Result
Set Name | all | ||||||
---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 100 | ||||||
Status |
|
Set Name | Test Cases |
---|---|
all | 00_sample_01.txt, 00_sample_02.txt, kensho_diff01, kensho_diff02, kensho_diff03, kensho_diff04, kensho_diff05, kensho_min-max01, kensho_min-max02, kensho_min-max03, kensho_min-max04, kensho_min-max05, kensho_min-max06, kensho_min-max07, kensho_min-max08, kensho_min-max09, kensho_min-max10, kensho_rand01, kensho_rand02, kensho_rand03, kensho_rand04, kensho_rand05, kensho_rand06, kensho_rand07, kensho_rand08, kensho_rand09, kensho_rand10 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_01.txt | WA | 18 ms | 792 KB |
00_sample_02.txt | TLE | 2030 ms | 812 KB |
kensho_diff01 | RE | 262 ms | 800 KB |
kensho_diff02 | RE | 275 ms | 788 KB |
kensho_diff03 | RE | 303 ms | 796 KB |
kensho_diff04 | RE | 282 ms | 800 KB |
kensho_diff05 | RE | 267 ms | 796 KB |
kensho_min-max01 | TLE | 2030 ms | 812 KB |
kensho_min-max02 | TLE | 2030 ms | 820 KB |
kensho_min-max03 | TLE | 2030 ms | 812 KB |
kensho_min-max04 | TLE | 2031 ms | 796 KB |
kensho_min-max05 | TLE | 2030 ms | 816 KB |
kensho_min-max06 | TLE | 2029 ms | 808 KB |
kensho_min-max07 | TLE | 2030 ms | 800 KB |
kensho_min-max08 | TLE | 2032 ms | 812 KB |
kensho_min-max09 | TLE | 2031 ms | 772 KB |
kensho_min-max10 | TLE | 2030 ms | 800 KB |
kensho_rand01 | TLE | 2030 ms | 816 KB |
kensho_rand02 | TLE | 2033 ms | 812 KB |
kensho_rand03 | TLE | 2030 ms | 816 KB |
kensho_rand04 | TLE | 2030 ms | 808 KB |
kensho_rand05 | TLE | 2031 ms | 784 KB |
kensho_rand06 | TLE | 2029 ms | 800 KB |
kensho_rand07 | TLE | 2030 ms | 812 KB |
kensho_rand08 | TLE | 2030 ms | 796 KB |
kensho_rand09 | TLE | 2030 ms | 808 KB |
kensho_rand10 | TLE | 2030 ms | 816 KB |