Submission #56003121


Source Code Expand

Copy
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
const long long mod = 1e9 + 7;
const int maxn = 2e5 + 10;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int n;
cin >> n;
string last;
for (int i = 0; i < n; ++i) {
string cur;
cin >> cur;
if (cur == "sweet" && last == "sweet" && i != n - 1) {
cout << "No\n";
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
const long long mod = 1e9 + 7;
const int maxn = 2e5 + 10;
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	#endif
	int n;
	cin >> n;
	string last;
	for (int i = 0; i < n; ++i) {
		string cur;
		cin >> cur;
		if (cur == "sweet" && last == "sweet" && i != n - 1) {
			cout << "No\n";
			exit(0);
		}
		last = cur;
	}
	cout << "Yes\n";
}

Submission Info

Submission Time
Task A - Glutton Takahashi
User N00BGH0ST
Language C++ 20 (gcc 12.2)
Score 100
Code Size 577 Byte
Status AC
Exec Time 1 ms
Memory 3532 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 19
Set Name Test Cases
Sample sample00.txt, sample01.txt, sample02.txt
All sample00.txt, sample01.txt, sample02.txt, testcase00.txt, testcase01.txt, testcase02.txt, testcase03.txt, testcase04.txt, testcase05.txt, testcase06.txt, testcase07.txt, testcase08.txt, testcase09.txt, testcase10.txt, testcase11.txt, testcase12.txt, testcase13.txt, testcase14.txt, testcase15.txt
Case Name Status Exec Time Memory
sample00.txt AC 1 ms 3472 KB
sample01.txt AC 1 ms 3532 KB
sample02.txt AC 1 ms 3412 KB
testcase00.txt AC 1 ms 3472 KB
testcase01.txt AC 1 ms 3480 KB
testcase02.txt AC 1 ms 3484 KB
testcase03.txt AC 1 ms 3488 KB
testcase04.txt AC 1 ms 3472 KB
testcase05.txt AC 1 ms 3532 KB
testcase06.txt AC 1 ms 3384 KB
testcase07.txt AC 1 ms 3468 KB
testcase08.txt AC 1 ms 3480 KB
testcase09.txt AC 1 ms 3484 KB
testcase10.txt AC 1 ms 3388 KB
testcase11.txt AC 1 ms 3404 KB
testcase12.txt AC 1 ms 3328 KB
testcase13.txt AC 1 ms 3420 KB
testcase14.txt AC 1 ms 3484 KB
testcase15.txt AC 1 ms 3480 KB


2025-02-27 (Thu)
22:19:28 +00:00