結果

問題 No.1640 簡単な色塗り
ユーザー harurunharurun
提出日時 2021-06-12 11:20:08
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 467 bytes
コンパイル時間 630 ms
コンパイル使用メモリ 74,816 KB
実行使用メモリ 5,000 KB
最終ジャッジ日時 2023-09-12 01:23:57
合計ジャッジ時間 12,207 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 61 ms
4,960 KB
testcase_05 AC 63 ms
4,848 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 1 ms
4,376 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 9 ms
4,376 KB
testcase_31 AC 53 ms
4,820 KB
testcase_32 AC 45 ms
4,844 KB
testcase_33 AC 32 ms
4,380 KB
testcase_34 AC 39 ms
4,628 KB
testcase_35 AC 32 ms
4,376 KB
testcase_36 AC 9 ms
4,376 KB
testcase_37 AC 12 ms
4,376 KB
testcase_38 AC 50 ms
4,876 KB
testcase_39 AC 21 ms
4,384 KB
testcase_40 AC 22 ms
4,380 KB
testcase_41 AC 40 ms
4,644 KB
testcase_42 AC 24 ms
4,380 KB
testcase_43 AC 26 ms
4,380 KB
testcase_44 AC 25 ms
4,376 KB
testcase_45 AC 19 ms
4,376 KB
testcase_46 AC 10 ms
4,376 KB
testcase_47 AC 6 ms
4,380 KB
testcase_48 AC 50 ms
4,924 KB
testcase_49 AC 4 ms
4,376 KB
testcase_50 AC 1 ms
4,380 KB
testcase_51 AC 2 ms
4,376 KB
testcase_52 WA -
testcase_53 WA -
07_evil_01.txt WA -
07_evil_02.txt WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

//嘘解法
#include <iostream>
#include <vector>
using namespace std;
#define ll long long


int main(){
  ll N,A,B;
  cin>>N;
  vector<ll> d(N),ans;
  for(int i=0;i<N;i++){
    cin>>A>>B;
    if(d.at(A-1)==0){
      ans.push_back(A);
      d.at(A-1)=1;
    }
    else if(d.at(B-1)==0){
      ans.push_back(B);
      d.at(B-1)=1;
    }
  }
  if(ans.size()<N){
    cout<<"No\n";
    return 0;
  }
  cout<<"Yes\n";
  for(ll i:ans){
    cout<<i<<"\n";
  }
  return 0;
}
0