QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#469548 | #6697. Calandar | YangHyyy | Compile Error | / | / | C++23 | 765b | 2024-07-09 20:05:45 | 2024-07-09 20:05:47 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define int long long
string ss[5]={"Monday","Tuesday","Wednesday","Thursday","Friday"};
int main()
{
int t;
cin>>t;
while(t--)
{
int a,b,c,x,y,z;
string s;
cin>>a>>b>>c>>s>>x>>y>>z;
int n=0,m=0;
n+=a*360+b*30+c;
m+=x*360+y*30+z;
int sum=abs(n-m);int xx;
if(n>=m)
{
for(int i=0;i<5;i++)
{
if(s==ss[i])
xx=((i-sum)%5+5)%5;
}
cout<<ss[xx];
}
else{
for(int i=0;i<5;i++)
{
if(s==ss[i])
xx=(i+sum)%5;
}
cout<<ss[xx];
}
}
return 0;
}
Details
cc1plus: error: ‘::main’ must return ‘int’