Submission #00025
ソースコード
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 | #include <bits/stdc++.h> using namespace std; int birthearly( int m1, int d1, int m2, int d2, int m3, int d3){ if (m3<min(m1,m2)){ return (0); } else if (min(m1,m2)<m3&&m3<max(m1,m2)){ return (1); } else if (max(m1,m2)<m3){ return (2); } else if (d3<min(d1,d2)){ return (0); } else if (min(d1,d2)<d3&&d3<max(d1,d2)){ return (1); } else { return (2); } } int main(){ int i,y[3],m[3],d[3],s; for (i=0;i<3;i++){ cin>>y[i]>>m[i]>>d[i]; } s= abs (y[0]-y[1]); switch (birthearly(m[0],d[0],m[1],d[1],m[2],d[2])){ case 0: break ; case 1: s++; break ; case 2: break ; } cout<<s<< "\n" ; return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0002 - Age Difference |
ユーザー名 | ei2229 |
投稿日時 | 2023-09-20 16:17:04 |
言語 | C++17 |
状態 | Wrong Answer |
得点 | 0 |
ソースコード長 | 780 Byte |
最大実行時間 | 30 ms |
最大メモリ使用量 | 764 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0 / 100 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
hand_made01.txt | AC | 24 ms | 476 KB |
1
|
hand_made02.txt | AC | 20 ms | 448 KB |
1
|
hand_made03.txt | AC | 21 ms | 416 KB |
1
|
hand_made04.txt | WA | 24 ms | 384 KB |
1
|
hand_made05.txt | AC | 17 ms | 480 KB |
1
|
in01.txt | AC | 20 ms | 704 KB |
1
|
in02.txt | WA | 18 ms | 680 KB |
1
|
in03.txt | AC | 25 ms | 520 KB |
1
|
in04.txt | AC | 24 ms | 496 KB |
1
|
in05.txt | AC | 23 ms | 596 KB |
1
|
in06.txt | WA | 21 ms | 568 KB |
1
|
in07.txt | AC | 23 ms | 540 KB |
1
|
in08.txt | AC | 30 ms | 636 KB |
1
|
in09.txt | WA | 15 ms | 472 KB |
1
|
in10.txt | AC | 19 ms | 568 KB |
1
|
in11.txt | AC | 21 ms | 540 KB |
1
|
in12.txt | AC | 21 ms | 516 KB |
1
|
in13.txt | AC | 18 ms | 488 KB |
1
|
in14.txt | AC | 18 ms | 588 KB |
1
|
in15.txt | AC | 23 ms | 560 KB |
1
|
in16.txt | AC | 18 ms | 524 KB |
1
|
in17.txt | AC | 21 ms | 496 KB |
1
|
in18.txt | AC | 19 ms | 468 KB |
1
|
in19.txt | AC | 15 ms | 572 KB |
1
|
in20.txt | AC | 18 ms | 540 KB |
1
|
in21.txt | AC | 21 ms | 508 KB |
1
|
in22.txt | AC | 19 ms | 480 KB |
1
|
in23.txt | AC | 24 ms | 584 KB |
1
|
in24.txt | AC | 23 ms | 688 KB |
1
|
in25.txt | WA | 20 ms | 660 KB |
1
|
in26.txt | AC | 20 ms | 764 KB |
1
|
in27.txt | AC | 20 ms | 736 KB |
1
|
in28.txt | AC | 19 ms | 712 KB |
1
|
in29.txt | WA | 20 ms | 680 KB |
1
|
in30.txt | WA | 27 ms | 648 KB |
1
|
sample01.txt | AC | 24 ms | 624 KB |
1
|
sample02.txt | AC | 23 ms | 472 KB |
1
|
sample03.txt | AC | 21 ms | 572 KB |
1
|