Submission #00011
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #include<stdio.h> using namespace std; int main(){ int i,j,n,m,cou=0; scanf ( "%d %d" ,&n,&m); int a[m],b[m],c[n],d[n]; for (i=0;i<m;i++){ scanf ( "%d %d" ,&a[i],&b[i]); if (a[i]==1){ c[b[i]-1]++; d[b[i]-1]++; } } for (i=0;i<n;i++){ if (c[i]>0){ for (j=0;j<m;j++){ if (a[j]==i&&c[b[j]-1]==0){ d[b[j]]++; } if (b[j]==i&&c[a[j]-1]==0){ d[a[j]-1]++; } } } } for (i=0;i<n;i++){ if (y[i]>0){ cou++; } } printf ( "%d\n" ,cou); return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0001 - パーティ |
ユーザー名 | ei1620 |
投稿日時 | 2017-11-04 14:40:18 |
言語 | C++11 |
状態 | Compile Error |
得点 | 0 |
ソースコード長 | 539 Byte |
最大実行時間 | - |
最大メモリ使用量 |
コンパイルメッセージ
./Main.cpp: In function ‘int main()’: ./Main.cpp:27:8: error: ‘y’ was not declared in this scope if(y[i]>0){ ^
セット
セット | 得点 | Cases |
---|
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|