QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#143397 | #6697. Calandar | qzez# | AC ✓ | 2ms | 3704kb | C++14 | 963b | 2023-08-21 10:50:27 | 2023-08-21 10:50:31 |
Judging History
answer
#include<bits/stdc++.h>
#define Gc() getchar()
#define Me(x,y) memset(x,y,sizeof(x))
#define Mc(x,y) memcpy(x,y,sizeof(x))
#define d(x,y) ((m)*(x-1)+(y))
#define R(n) (rnd()%(n)+1)
#define Pc(x) putchar(x)
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
using namespace std;using ll=long long;using db=double;using lb=long db;using ui=unsigned;using ull=unsigned long long;using pii=pair<int,int>;using LL=__int128;
const int N=1e3+5,M=N*4+5,K=31650,mod=998244353,Mod=mod-1;const db eps=1e-9;const int INF=1e9+7;mt19937 rnd(time(0));
int x,y,z;ll d,ds;
string c;
string s[5]={"Monday","Tuesday","Wednesday","Thursday","Friday"};
void Solve(){
scanf("%d%d%d",&x,&y,&z);
d=x*30ll*12+y*30ll+z;
cin>>c;
int p=0;
for(int i=0;i<5;i++) if(s[i]==c) {p=i;break;}
scanf("%d%d%d",&x,&y,&z);
ds=x*30*12ll+y*30ll+z;
cout<<s[((ds-d+p)%5+5)%5]<<'\n';
}
int main(){
int t;scanf("%d",&t);while(t--) Solve();
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3704kb
input:
4 2019 5 12 Monday 2019 5 14 2019 5 12 Tuesday 2019 12 30 2019 5 12 Friday 1000000000 1 1 1000000000 1 1 Wednesday 2019 5 12
output:
Wednesday Friday Thursday Thursday
result:
ok 4 lines
Test #2:
score: 0
Accepted
time: 2ms
memory: 3636kb
input:
100 60523000 9 6 Tuesday 667062297 1 19 818045248 9 22 Wednesday 950448235 4 11 347752308 10 25 Thursday 18640223 2 6 740295050 11 22 Wednesday 185496318 7 25 905846973 3 14 Tuesday 132078200 7 11 748835058 9 22 Wednesday 863118887 3 24 225924970 2 17 Wednesday 807058915 11 19 326750305 4 30 Wednesd...
output:
Friday Tuesday Friday Monday Thursday Friday Friday Thursday Monday Monday Friday Tuesday Thursday Monday Friday Friday Wednesday Monday Tuesday Thursday Wednesday Thursday Friday Tuesday Tuesday Friday Monday Tuesday Thursday Monday Tuesday Wednesday Wednesday Monday Thursday Wednesday Wednesday Fr...
result:
ok 100 lines