text
stringlengths 49
983k
|
|---|
#include<bits/stdc++.h>
using namespace std;
typedef long long int LL;
LL red(LL s, LL c, LL b){
LL ret=(s-c)/b*b;
ret=max(ret,0ll);
if ((s-c)%b!=0)ret+=b;
ret=max(ret,b);
return ret;
}
LL gcd(LL a, LL b){
LL ret=1;
while (ret>0){
ret=a%b;
a=b;
b=ret;
}
return a;
}
int main(){
int tc;
cin>>tc;
while (tc--){
LL a,b,c,d;
cin>>a>>b>>c>>d;
if (d<b){
printf ("No\n");
}
else{
LL rep=gcd(b,d);
LL init=a-red(a,c,b);
LL low=c+rep;
if (low-b<0||init<0)printf ("No\n");
else printf ("Yes\n");
}
}
}
|
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define ll long long
int main(){
int T;
cin>>T;
ll A,B,C,D;
rep(i,T){
cin>>A>>B>>C>>D;
ll ans=1;
if(A<B||B>D) ans=0;
else if(B>C){
ll E=B,r=D%B;
while(r){
D=E;
E=r;
r=D%E;
}
if(max((B-1)/E*E,(B-(A%B)-1)/E*E+A%B)>C) ans=0;
}
cout<<(ans?"Yes":"No")<<endl;
}
}
|
#include <cstdio>
typedef long long lint;
lint gcd(lint x,lint y){
return y==0?x:gcd(y,x%y);
}
int main(){
int T;
scanf("%d",&T);
lint A,B,C,D;
while(T--){
scanf("%lld%lld%lld%lld",&A,&B,&C,&D);
lint g = gcd(B,D);
if(A>=B && A%B<=C && D>=B && B-g<=C){
puts("Yes");
}else{
puts("No");
}
}
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
typedef long long i64;
int T; i64 A, B, C, D, g; i64 gcd(i64 a, i64 b) { return b?gcd(b, a%b):a; }
int main()
{
for(scanf("%d", &T); T--; )
{
scanf("%lld%lld%lld%lld", &A, &B, &C, &D);
if(A < B||D < B) puts("No");
else if(B <= C+1) puts("Yes");
else g = gcd(B, D), puts((A-B)/g == (A-C-1)/g?"Yes":"No");
}
return 0;
}
|
#include<cstdio>
long long gcd(long long a, long long b) {
long long r;
while((r = a % b) != 0) {
a = b;
b = r;
}
return b;
}
int main() {
int t;
scanf("%d", &t);
for(int i=0;i<t;i++) {
bool ans;
long long a, b, c, d;
scanf("%lld %lld %lld %lld", &a, &b, &c, &d);
long long g = gcd(b, d);
long long m = c - a + g * ((d - c + a - 1) / g);
if(d >= b && a >= b && d - m - b + c >= 0) {
ans = true;
} else {
ans = false;
}
printf("%s\n", ans ? "Yes" : "No");
}
return 0;
}
|
#include<bits/stdc++.h>
#define ll long long
using namespace std;
ll gcd(ll x,ll y){
if(!y)return x;
return gcd(y,x%y);
}
int main(){
ll t1,A,B,C,D,hh,x,y;
scanf("%lld",&t1);
while(t1--){
scanf("%lld%lld%lld%lld",&A,&B,&C,&D);C++;
if(B>D){
puts("No");continue;
}
if(A<C){
if(A<B){
puts("No");continue;
}
A=C+D-B-(A-C)%(D-B);
}
x=(A-C)%B;y=D-B;
hh=gcd(y,B);x=x%hh;
if(x+C>=B)puts("Yes");
else puts("No");
}
}
/*
B>D 不行
*/
|
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
using namespace std;
int t;
long long a,b,c,d;
long long mygcd(long long x,long long y)
{
return !y?x:mygcd(y,x%y);
}
int main()
{
scanf("%d",&t);
while(t--)
{
scanf("%lld%lld%lld%lld",&a,&b,&c,&d);
if(d<b || a<b)
{
puts("No");
continue;
}
if(c>=b)
{
puts("Yes");
continue;
}
long long g=mygcd(b,d%b);
if(b-g+a%g>c)puts("No");
else puts("Yes");
}
return 0;
}
|
#include<iostream>
using namespace std;
typedef long long int ll;
int T;
ll GCD(ll a, ll b){
if(b == 0) return a;
else return GCD(b, a % b);
}
int main(){
cin >> T;
for(int i = 0; i < T; i++){
ll A, B, C, D;
cin >> A >> B >> C >> D;
if(A < B || B > D){
cout << "No" << endl;
continue;
}
A %= B;
if(A > C && C < B){
cout << "No" << endl;
continue;
}
ll g = GCD(B, D);
if(B - g + (A % g) > C){
cout << "No" << endl;
continue;
}
cout << "Yes" << endl;
}
return 0;
}
|
#include<stdio.h>
typedef long long ll;
template<class T>T gcd(T x,T y){return y?gcd(y,x%y):x;}
int T;ll a,b,c,d,g;
int main(){
for(scanf("%d",&T);T;--T){
scanf("%lld%lld%lld%lld",&a,&b,&c,&d);
if(a<b||d<b)puts("No");
else if(b-c<=1)puts("Yes");
else if(b-c-1>=(g=gcd(b,d)))puts("No");
else if(((c-a)%g+g)%g>((b-2-a)%g+g)%g)puts("No");
else puts("Yes");
}
}
|
#include <bits/stdc++.h>
using namespace std;
long long gcd(long long A,long long B)
{
return B==0?A:gcd(B,A%B);
}
int main()
{
int T;
scanf("%d",&T);
while(T--){
long long A,B,C,D;
scanf("%lld%lld%lld%lld",&A,&B,&C,&D);
bool ans;
if(D<B||A<B){
ans=0;
}
else{
long long g=gcd(D,B);
long long E=A%B+(B-A%B-1)/g*g;
ans=(E<=C);
}
puts(ans?"Yes":"No");
}
return 0;
}
|
#include<iostream>
using namespace std;
long long gcd(long long x,long long y){
if(y==0)return x;
return gcd(y,x%y);
}
int main(){
ios::sync_with_stdio(0);
long long n,a,b,c,d;
cin>>n;
for(int i=0;i<n;++i){
cin>>a>>b>>c>>d;
if(a<b||b>d){
cout<<"No\n";
continue;
}
if(b<=c+1){
cout<<"Yes\n";
continue;
}
long long g=gcd(b,d);
if((a%g)+b-g>c)cout<<"No\n";
else cout<<"Yes\n";
}
return 0;
}
|
#include<iostream>
using namespace std;
long long gcd(long long a, long long b) {
long long c;
if (a < b)a += b, b = a - b, a -= b;
while (b != 0) c = a % b, a = b, b = c;
return a;
}
int main() {
long long t, a, b, c, d;
cin >> t;
for (int i = 0; i < t; i++) {
cin >> a >> b >> c >> d;
int x = 0;
long long z = (a - c) % gcd(b, d);
if (z == 0) z = gcd(b, d);
if (b - c <= z) x = 1;
if (a < b || d < b) x = 0;
if (x == 0) cout << "No" << endl;
else cout << "Yes" << endl;
}
}
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
if((a*b)%2==0)cout<<"Even";
else cout<<"Odd";
return 0;
}
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int X,A,B;
cin >> A>>B;
cout <<((A*B)%2 ? "Odd" : "Even")<<endl;
return 0;
}
|
#include <stdio.h>
int main (){
int a,b;
scanf ("%d %d",&a,&b);
if((a*b)%2==0){
printf ("Even\n");
}else printf ("Odd\n");
}
|
#include<iostream>
using namespace std;
int a,b;
int main(){
cin>>a>>b;
if((a*b)%2) cout<<"Odd"<<endl;
else cout<<"Even"<<endl;
}
|
#include<cstdio>
int main() {
int a,b;
scanf("%d%d",&a,&b);
if((a*b)%2)
printf("Odd\n");
else printf("Even\n");
}
|
#include<cstdio>
#include<iostream>
using namespace std;
int a,b;
int main(){
cin>>a>>b;
a*=b;
puts(a%2?"Odd":"Even");
return 0;
}
|
#include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
if(a*b%2==0)
{
cout<<"Even";
}
else
cout<<"Odd";
}
|
#include<bits/stdc++.h>
using namespace std;
int a,b,c;
int main()
{
cin>>a>>b;
c=a*b;
printf(c%2==0?"Even":"Odd");
printf("\n");
}
|
#include<cstdio>
int main()
{
int a, b;
scanf("%d%d", &a, &b);
if ((a * b) & 1)
puts("Odd");
else
puts("Even");
return 0;
}
|
#include <iostream>
int main(){
int a,b;
std::cin >> a >> b;
std::cout << ((a * b) % 2? "Odd":"Even") << std::endl;
}
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,a;
cin >>n>> a;
if((a*n)%2==0) cout <<"Even";
else cout <<"Odd";
}
|
#include<iostream>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
cout << (a * b % 2 == 1 ? "Odd" : "Even");
return 0;
}
|
#include<iostream>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
cout << (a*b%2==1?"Odd":"Even") << endl;
}
|
#include<cstdio>
using namespace std;
int main(){
int a,b;
scanf("%d%d",&a,&b);
if(a%2==0||b%2==0)printf("Even\n");
else printf("Odd\n");
}
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<((a*b)%2?"Odd":"Even")<<endl;
return 0;
}
|
#include <iostream>
using namespace std;
int main(){int a,b;cin>>a>>b;if(a&b&1)puts("Odd");else puts("Even");}
|
#include <iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
a*=b;
if(a%2)cout<<"Odd";
else cout<<"Even";
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main () {
int a, b;
cin >> a >> b;
printf(a*b % 2 == 0 ? "Even" : "Odd");
}
|
#include <iostream>
using namespace std;
int main() {
int A, B;
cin >> A >> B;
cout << (((A*B)%2)?"Odd":"Even") << "\n";
}
|
#include <iostream>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
if((a*b)%2) cout << "Odd";
else cout << "Even";
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int A, B;
cin>>A>>B;
if(A%2==0||B%2==0){
cout<<"Even";
}
else{
cout<<"Odd";
}}
|
#include<cstdio>
int main(){
int a,b;
scanf("%d%d",&a,&b);
if(!((a*b)%2)) printf("Even\n");
else printf("Odd\n");
}
|
#include <iostream>
using namespace std;
int main()
{
int a, b; cin >> a >> b;
cout << ((a*b)%2 == 0 ? "Even" : "Odd");
return 0;
}
|
#include<cstdio>
int main(void){
int a, b;
scanf("%d %d", &a, &b);
printf("%s\n", a * b % 2 ? "Odd" : "Even");
return 0;
}
|
#include<ios>
int main(){
int iA,iB;
scanf("%d%d",&iA,&iB);
iA*iB%2 ? printf("Odd\n"):printf("Even\n");
return 0;
}
|
#include <cstdio>
int main()
{
int a, b;
scanf("%d %d", &a, &b);
puts((a & b & 1) == 1 ? "Odd" : "Even");
return 0;
}
|
#include <iostream>
using namespace std;
int a, b;
int main() {
cin>>a>>b;
cout << (a*b%2 ? "Odd" : "Even") << endl;
return 0;
}
|
#include<cstdio>
int main() {
int a,b;
scanf("%d %d",&a,&b);
if(a%2==0||b%2==0) printf("Even\n");
else printf("Odd\n");
}
|
#include <stdio.h>
int main() {
int a, b;
scanf("%d %d", &a, &b);
if ((a * b) % 2)
printf("Odd");
else
printf("Even");
}
|
#include <cstdio>
int a,b;
int main() {
scanf("%d%d",&a,&b);
if(a%2&&b%2) printf("Odd");
else printf("Even");
return 0;
}
|
#include <iostream>
using namespace std;
int N, A;
int main() {
cin >> N >> A;
cout << (N*A%2 == 0 ? "Even" : "Odd") << endl;
return 0;
}
|
#include<bits/stdc++.h>
using namespace std;
int main(void){
int a,b;
cin>>a>>b;
cout<<(a*b%2==0?"Even":"Odd");
}
|
#include <stdio.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
if(a*b %2 ==1)
printf("Odd");
else
printf("Even");
}
|
#include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << ((a & b & 1) == 1 ? "Odd" : "Even") << endl;
}
|
#include<iostream>
int main(){
int a,b;
std::cin >> a >> b;
if(a*b%2) std::cout << "Odd";
else std::cout << "Even";
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin >> a >> b;
cout << (((a*b%2)==0) ? "Even": "Odd")<< endl;
}
|
#include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
if((a*b)%2==0) cout<<"Even"<<endl;
else cout<<"Odd"<<endl;
return 0;
}
|
#include <iostream>
int main() {
int a,b;
std::cin >> a >> b;
std::cout << (((a%2)*(b%2)==1) ? "Odd" : "Even") << '\n';
return 0;
}
|
#include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
int result=a*b;
(result%2)?cout<<"Odd":cout<<"Even";
}
|
#include<bits/stdc++.h>
int main()
{
long long a , b;
scanf("%lld%lld",&a,&b);
a *= b;
printf(a % 2 == 0 ? "Even" : "Odd");
return 0;
}
|
#include<cstdio>
int main()
{
int n,m;scanf("%d%d",&n,&m);
if(n*m%2) printf("Odd");else printf("Even");
return 0;
}
|
#include <stdio.h>
int main(){
int a, b;
scanf("%d%d",&a, &b);
if(a * b % 2) printf("Odd"); else printf("Even");
return 0;
}
|
#include<iostream>
using namespace std;
int a,b;
int main(void){
cin>>a>>b;
if(a*b%2==1)cout<<"Odd";
else cout<<"Even";
return 0;
}
|
#include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << ((a * b % 2 == 1) ? "Odd" : "Even") << endl;
}
|
#include<iostream>
using namespace std;
int main()
{
int n,m;
cin>>n>>m;
if((n*m)%2==0){cout<<"Even";return 0;}
cout<<"Odd";
}
|
#include<bits/stdc++.h>
int main(){
int a,b;
scanf("%d%d",&a,&b);
printf("%s\n",a*b%2?"Odd":"Even");
return 0;
}
|
#include<bits/stdc++.h>
using namespace std;
int main(){int A,B;cin>>A>>B;if(A*B%2==0)cout<<"Even"<<endl;else cout<<"Odd"<<endl;}
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
cout << ((a*b)%2? "Odd":"Even") << endl;
}
|
#include <iostream>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
cout << (((a*b%2)==0)?"Even":"Odd") << endl;
}
|
#include<stdio.h>
int main(void)
{
int a,b;
scanf("%d %d",&a,&b);
a=a*b;
if(a%2==0) printf("Even\n");
else printf("Odd\n");
return 0;
}
|
#include <iostream>
using namespace std;
int a, b;
int main() {
cin>>a>>b;
cout<<(a*b%2 ? "Odd":"Even");
return 0;
}
|
#include <iostream>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
cout << (a*b & 1 ? "Odd" : "Even") << endl;
}
|
#include <iostream>
int main()
{
int a, b;
std::cin >> a >> b;
int r = a *b;
std::cout << (r % 2 == 0 ? "Even" : "Odd");
}
|
#include<ios>
int main(){int a,b;scanf("%d%d",&a,&b);puts(a&b&1?"Odd":"Even");}
|
#include <bits/stdc++.h>
using namespace std;
int a, b;
int main(){
cin >> a >> b;
cout << (a%2==0||b%2==0?"Even":"Odd") << "\n";
}
|
#include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << ((a * b) % 2 ? "Odd" : "Even") << endl;
}
|
#include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<((a*b)%2?"Odd":"Even");
}
|
#include<iostream>
using namespace std;
int main()
{
long long int a,b;
cin>>a>>b;
((a*b)%2==0)?cout<<"Even":cout<<"Odd";
return 0;
}
|
#include<iostream>
using namespace std;
int a,b;
int main()
{
cin>>a>>b;
if(a*b%2)cout<<"Odd";
else cout<<"Even";
}
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;cin>>a>>b;
cout<<(a*b%2?"Odd":"Even")<<endl;
}
|
#include <iostream>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
cout << (a*b%2==0 ? "Even" : "Odd") << endl;
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int A, B;
cin >> A >> B;
cout << ((A*B)%2 == 0 ? "Even":"Odd") << endl;
}
|
#include <bits/stdc++.h>
using namespace std;
int main() {
int A, B;
cin >> A >> B;
cout << ((A * B % 2) ? "Odd" : "Even") << "\n";
}
|
#include<bits/stdc++.h>
using namespace std;
int a,n;
int main()
{
cin>>n>>a;
n=n*a;
if(n%2) cout<<"Odd";
else cout<<"Even";
return 0;
}
|
#include<bits/stdc++.h>
using namespace std;
int a,b;
int main(){
cin>>a>>b;
if(a*b%2==0)cout<<"Even"<<endl;
else cout<<"Odd"<<endl;
}
|
#include<cstdio>
int a,b;
int main()
{
scanf("%d%d",&a,&b);
if(a%2==0||b%2==0)
printf("Even\n");
else
printf("Odd\n");
}
|
#include<iostream>
using namespace std ;
int main() {
int a,b ; cin >> a >> b ;
(a*b)%2==0 ? cout << "Even" : cout << "Odd" ;
}
|
/*Lucky_Glass*/
#include<cstdio>
int main()
{
long long a,b,c;
scanf("%lld%lld",&a,&b);
c=a*b;
puts(c%2? "Odd":"Even");
return 0;
}
|
#include <iostream>
using namespace std;
int a,b;
int main()
{
cin>>a>>b;
cout<<((a&1)&&(b&1)?"Odd\n":"Even\n");
return 0;
}
|
#include<cstdio>
int main()
{
int a,b;
scanf("%d%d",&a,&b);
if(a%2==0||b%2==0)
printf("Even\n");
else
printf("Odd\n");
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int A, B;
int main() {
cin >> A >> B;
cout << ((A * B) % 2 <= 0 ? "Even" : "Odd") << endl;
}
|
#include<cstdio>
int a,b;
int main(){
scanf("%d%d",&a,&b);
if(a*b&1)puts("Odd");else puts("Even");
}
|
#include <iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<((a%2==0||b%2==0)?"Even":"Odd");
return 0;
}
|
#include<cstdio>
int main()
{
int a, b;
scanf("%d%d", &a, &b);
a & b & 1 ? puts("Odd") : puts("Even");
}
|
#include<iostream>
int main() {
int a, b;
std::cin >> a >> b;
int A = a*b;
if (A% 2 == 0) puts("Even");
else puts("Odd");
return 0;
}
|
#include<cstdio>
int main(){
int a,b;
scanf("%d %d",&a,&b);
if((a*b)%2==0)
printf("Even");
else
printf("Odd");
return 0;
}
|
#include<cstdio>
int a,b;
int main(){
scanf("%d%d",&a,&b);
if(a%2==1 and b%2==1)
printf("Odd");
else
printf("Even");
return 0;
}
|
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
if(a*b%2)puts("Odd");
else puts("Even");
}
|
#include <iostream>
using namespace std;
int main(){
int a,b;
while(cin>>a>>b){
if((a*b)%2==0)cout<<"Even";
else cout<<"Odd";
}
}
|
#include <iostream>
using namespace std;
int main(){int a,b;cin>>a>>b;if(a&b&1)puts("Odd");else puts("Even");return 0;}
|
#include<stdio.h>
int main()
{
int a,b;
scanf("%d%d",&a,&b);
if((a*b)%2==0)printf("Even\n");
else
printf("Odd\n");
}
|
#include<iostream>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
if(a%2==1&&b%2==1)cout<<"Odd";
else cout<<"Even";
return 0;
}
|
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a%2==1&&b%2==1?"Odd":"Even")<<endl;
}
|
#include<iostream>
using namespace std;
int a,b;
int main()
{
cin>>a>>b;
if(a&1&&b&1)cout<<"Odd"<<endl;
else
cout<<"Even"<<endl;
}
|
#include<cstdio>
int main()
{
int a,b;
scanf("%d%d",&a,&b);
printf("%s\n",a*b%2==0?"Even":"Odd");
return 0;
}
|
#include<iostream>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
((a*b)%2==0)? cout<<"Even":cout<<"Odd";
}
|
#include <iostream>
using namespace std ;
int main()
{
int x,y;
cin>>x>>y;
if(x*y%2==0)
cout<<"Even";
else cout<<"Odd";
return 0;
}
|
# include <stdio.h>
int main(){
int a, b;
scanf("%d %d", &a, &b);
puts(a*b&1 ? "Odd" : "Even");
return 0;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.