QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#612050#6697. Calandarkevinyang#AC ✓0ms3616kbC++14679b2024-10-05 03:10:112024-10-05 03:10:12

Judging History

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

  • [2024-10-05 03:10:12]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3616kb
  • [2024-10-05 03:10:11]
  • 提交

answer

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

#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;

signed main() {
	cin.tie(0)->sync_with_stdio(0);
	int t;
	cin >> t;
	while(t--){
		vector<string>a = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday"};
		map<string,int>hm;
		for(int i = 0; i<5; i++){
			hm[a[i]] = i;
		}
		int d,d2;
		cin >> d >> d >> d;
		string s;
		cin >> s;
		int v = hm[s];
		cin >> d2 >> d2 >> d2;
		v+=d2-d+100;
		v%=5;
		cout << a[v] << '\n';
	}
	return 0;
}

这程序好像有点Bug,我给组数据试试?

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3556kb

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: 0ms
memory: 3616kb

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