Submission #00061


ソースコード

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
#include <bits/stdc++.h>
using namespace std;
int birthearly(int m1,int d1,int m2,int d2,int m3,int d3){
if(min(m1,m2)<=m3&&m3<=max(m1,m2)){
if(min(d1,d2)<=d3&&d3<max(d1,d2)){
return(1);
}else{
return(0);
}
}else{
return(0);
}
}
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]);
if(birthearly(m[0],d[0],m[1],d[1],m[2],d[2])){
s++;
}
cout<<s<<"\n";
return(0);
}

ステータス

項目 データ
問題 0002 - Age Difference
ユーザー名 ei2229
投稿日時 2023-09-20 16:33:04
言語 C++17
状態 Wrong Answer
得点 0
ソースコード長 547 Byte
最大実行時間 30 ms
最大メモリ使用量 732 KB

セット

セット 得点 Cases
1 ALL 0 / 100 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
hand_made01.txt AC 18 ms 604 KB
1
hand_made02.txt AC 22 ms 700 KB
1
hand_made03.txt AC 20 ms 544 KB
1
hand_made04.txt AC 17 ms 392 KB
1
hand_made05.txt WA 24 ms 492 KB
1
in01.txt AC 24 ms 588 KB
1
in02.txt WA 24 ms 560 KB
1
in03.txt WA 21 ms 532 KB
1
in04.txt AC 20 ms 500 KB
1
in05.txt AC 23 ms 604 KB
1
in06.txt WA 28 ms 580 KB
1
in07.txt AC 22 ms 552 KB
1
in08.txt AC 25 ms 528 KB
1
in09.txt WA 27 ms 500 KB
1
in10.txt AC 16 ms 596 KB
1
in11.txt WA 20 ms 564 KB
1
in12.txt AC 19 ms 528 KB
1
in13.txt AC 24 ms 504 KB
1
in14.txt AC 26 ms 596 KB
1
in15.txt WA 21 ms 568 KB
1
in16.txt AC 30 ms 536 KB
1
in17.txt AC 26 ms 504 KB
1
in18.txt AC 23 ms 732 KB
1
in19.txt AC 19 ms 700 KB
1
in20.txt WA 16 ms 672 KB
1
in21.txt AC 25 ms 640 KB
1
in22.txt AC 21 ms 612 KB
1
in23.txt WA 19 ms 584 KB
1
in24.txt AC 18 ms 688 KB
1
in25.txt WA 18 ms 660 KB
1
in26.txt AC 22 ms 628 KB
1
in27.txt AC 21 ms 596 KB
1
in28.txt WA 23 ms 568 KB
1
in29.txt WA 20 ms 540 KB
1
in30.txt WA 21 ms 644 KB
1
sample01.txt AC 19 ms 488 KB
1
sample02.txt AC 18 ms 584 KB
1
sample03.txt AC 21 ms 684 KB
1