結果
問題 |
No.479 頂点は要らない
|
ユーザー |
![]() |
提出日時 | 2024-12-22 14:17:59 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 379 bytes |
コンパイル時間 | 355 ms |
コンパイル使用メモリ | 31,872 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-22 14:18:01 |
合計ジャッジ時間 | 2,010 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 11 WA * 27 |
ソースコード
#include<cstdio> using namespace std; const int N=1e5+10; bool vis[N]; int main() { //freopen("highway.in","r",stdin); //freopen("highway.out","w",stdout); int n,m,u,v; scanf("%d %d",&n,&m); while(m--) scanf("%d %d",&u,&v),vis[u<v?u:v]=true; for(int i=n-1;i>=0;i--) { if(!vis[i]) continue; for(int j=i;j>=0;j--) printf("%d",vis[j]); break; } return 0; }