公式

A - Not Acceptable 解説 by en_translator


One can determine if the submission is before the due as follows:

  • If \(A>C\), then Yes.
  • If \(A<C\), then No.
  • If \(A=C\): if \(B>D\), then Yes; if \(B<D\), then No.

This can be implemented using an if statement.

Alternatively, one can compare by the duration passed since the beginning of May \(17\)-th, by printing Yes if \((60*A+B)>(60*C+D)\) and No if \((60*A+B)<(60*C+D)\).

Sample code in C++:

#include <bits/stdc++.h>
using namespace std;

int main(void){
	int a,b,c,d;

	cin>>a>>b>>c>>d;

	if(a>c)cout<<"Yes"<<endl;
	else if(a<c)cout<<"No"<<endl;
	else if(b>d)cout<<"Yes"<<endl;
	else cout<<"No"<<endl;
	
	return 0;
}

Sample code in Python:

a,b,c,d=map(int, input().split())

if a>c:
    print("Yes")
elif a<c:
    print("No")
elif b>d:
    print("Yes")
else:
    print("No")

投稿日時:
最終更新: