QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#100320#4653. Painting Gamejcccc#WA 28ms3468kbC++17773b2023-04-25 16:24:392023-04-25 16:24:41

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-04-25 16:24:41]
  • 评测
  • 测评结果:WA
  • 用时:28ms
  • 内存:3468kb
  • [2023-04-25 16:24:39]
  • 提交

answer

#include<bits/stdc++.h>
#define x first
#define y second
#define endl '\n'
#define LL long long
#define ios ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
using namespace std;
const LL N = 2000010, MOD = 1e18;
typedef pair<int, int> PII;
LL n, m1, m2, t = 1;
LL cnt[N];
int main() {
	ios;
	cin >> t;
	while(t--){
		string s;
		cin >> n >> s;
		if(s == "Alice") {
			int ans = n / 7 * 3;
			int x = n % 7;
			if(x == 0) cout << ans << endl;
			else if(x <= 3) cout << ans + 1 << endl;
			else if(x <= 5) cout << ans + 2 << endl;
			else cout << ans + 3 << endl;
		}
		else {
			int ans = n / 7 * 3;
			int x = n % 7;
			if(x <= 2) cout << ans + 1 << endl;
			else if(x <= 4) cout << ans + 2 << endl;
			else cout << ans + 3 << endl;
		}
	}
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 28ms
memory: 3468kb

input:

100000
202887890 Bob
212404006 Bob
127716000 Alice
334251217 Bob
379690549 Alice
450610130 Alice
946907168 Bob
29213358 Bob
112883509 Bob
794872736 Bob
403671135 Alice
714834265 Bob
540986736 Bob
935406639 Bob
756411692 Bob
182091395 Alice
662716337 Alice
217541941 Alice
190231925 Bob
705864412 Alic...

output:

86951953
91030289
54735429
143250522
162724521
193118627
405817358
12520011
48378647
340659745
173001915
306357543
231851459
400888560
324176440
78039169
284021287
93232261
81527968
302513320
385317310
248910271
89712786
114747698
104329089
318680693
405027784
340745047
158738673
175289439
229444256...

result:

wrong answer 10th lines differ - expected: '340659744', found: '340659745'