QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#612683#6697. Calandarzqx#RE 0ms0kbC++231008b2024-10-05 12:34:202024-10-05 12:34:20

Judging History

你现在查看的是最新测评结果

  • [2024-10-05 12:34:20]
  • 评测
  • 测评结果:RE
  • 用时:0ms
  • 内存:0kb
  • [2024-10-05 12:34:20]
  • 提交

answer

#include<bits/stdc++.h>
#define AC return 0;
#define int long long 
#define pii pair<int,int>
#define all(tar) tar.begian(),tar.end()
const int maxx=2e5+5;
const int mod=998244353; 
using namespace std;
int n,m,t;
int zh(int year,int mon,int day){
   int res=year*12*30+mon*30+day;
}
map<string,int>mp;
void solve(){
   int year,mon,day;
   string str;
   cin>>year>>mon>>day>>str;
   int res1=zh(year,mon,day);
   cin>>year>>mon>>day;
   int res2=zh(year,mon,day);
   int cha=abs(res1-res2);
   int today=(mp[str]+cha-1)%5+1;
   if(res1>res2) today=6-today;
   if(today==1) cout<<"Monday\n";
   else if(today==2) cout<<"Tuesday\n";
   else if(today==3) cout<<"Wednesday\n";
   else if(today==4) cout<<"Thursday\n";
   else cout<<"Friday\n";
}
signed main(){
   ios::sync_with_stdio(false);
   cin.tie(0);
   cout.tie(0);
   int T;cin>>T;
   mp["Monday"]=1;mp["Tuesday"]=2;mp["Wednesday"]=3;mp["Thursday"]=4;mp["Friday"]=5;
   while(T--){
      solve();
   }
   AC
}   

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Runtime Error

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:


result: