Submission #00023
ソースコード
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 34 35 36 37 38 | #include<bits/stdc++.h> using namespace std; struct men { int a,b; bool operator<( const men &r) const { if (a == r.a) { return b < r.b; } else { return a < r.a; } } }; main(){ men a[6]; for ( int i=0;i<6;i++){ cin>>a[i].a>>a[i].b; if (a[i].a>a[i].b)swap(a[i].a,a[i].b); } sort(a,a+6); int flag=0; for ( int i=0;i<6;i+=2){ if (a[i].a==a[i+1].a && a[i].b==a[i+1].b){ } else { flag=1; break ; } } if (flag){ cout<< "no" <<endl; return 0; } if (a[0].a==a[2].a && a[0].b==a[4].a && a[2].b==a[4].b){ cout<< "yes" <<endl; } else { cout<< "no" <<endl; } } |
ステータス
項目 | データ |
---|---|
問題 | 0001 - 直方体 |
ユーザー名 | 七代目清水天三郎丸 |
投稿日時 | 2017-10-24 18:16:38 |
言語 | C++11 |
状態 | Accepted |
得点 | 6 |
ソースコード長 | 671 Byte |
最大実行時間 | 28 ms |
最大メモリ使用量 | 720 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 6 / 6 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in01.txt | AC | 12 ms | 480 KB |
1
|
in02.txt | AC | 17 ms | 456 KB |
1
|
in03.txt | AC | 21 ms | 560 KB |
1
|
in04.txt | AC | 26 ms | 668 KB |
1
|
in05.txt | AC | 28 ms | 644 KB |
1
|
in06.txt | AC | 18 ms | 496 KB |
1
|
in07.txt | AC | 19 ms | 596 KB |
1
|
in08.txt | AC | 15 ms | 572 KB |
1
|
in09.txt | AC | 16 ms | 548 KB |
1
|
in10.txt | AC | 16 ms | 524 KB |
1
|
in11.txt | AC | 12 ms | 500 KB |
1
|
in12.txt | AC | 15 ms | 476 KB |
1
|
in13.txt | AC | 13 ms | 584 KB |
1
|
in14.txt | AC | 27 ms | 564 KB |
1
|
in15.txt | AC | 13 ms | 536 KB |
1
|
in16.txt | AC | 19 ms | 508 KB |
1
|
in17.txt | AC | 18 ms | 488 KB |
1
|
in18.txt | AC | 21 ms | 720 KB |
1
|
in19.txt | AC | 12 ms | 696 KB |
1
|
in20.txt | AC | 16 ms | 668 KB |
1
|
in21.txt | AC | 22 ms | 516 KB |
1
|
in22.txt | AC | 13 ms | 616 KB |
1
|
in23.txt | AC | 20 ms | 596 KB |
1
|
in24.txt | AC | 23 ms | 696 KB |
1
|
in25.txt | AC | 16 ms | 544 KB |
1
|
in26.txt | AC | 22 ms | 524 KB |
1
|
in27.txt | AC | 20 ms | 500 KB |
1
|
in28.txt | AC | 18 ms | 476 KB |
1
|
in29.txt | AC | 16 ms | 584 KB |
1
|
in30.txt | AC | 16 ms | 560 KB |
1
|