Submission #58208865
Source Code Expand
Copy
#include<iostream>#include<vector>#include<map>#include<string>#include<queue>#include<stack>#include<random>using namespace std;const int N = 1e6 + 10;using ll = long long;using pii = pair<int, int>;#define endl '\n'void solve(){int ans = 0;for (int i = 1; i <= 12; i++){string s; cin >> s;if (s.size() == i)ans++;}cout << ans;
#include<iostream> #include<vector> #include<map> #include<string> #include<queue> #include<stack> #include<random> using namespace std; const int N = 1e6 + 10; using ll = long long; using pii = pair<int, int>; #define endl '\n' void solve() { int ans = 0; for (int i = 1; i <= 12; i++) { string s; cin >> s; if (s.size() == i)ans++; } cout << ans; } int main() { ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); int _ = 1; //cin >> _; while (_--)solve(); return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - September |
User | irohika |
Language | C++ 20 (gcc 12.2) |
Score | 100 |
Code Size | 511 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 3528 KB |
Compile Error
Main.cpp: In function ‘void solve()’: Main.cpp:19:30: warning: comparison of integer expressions of different signedness: ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare] 19 | if (s.size() == i)ans++; | ~~~~~~~~~^~~~
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_00.txt, 00_sample_01.txt |
All | 00_sample_00.txt, 00_sample_01.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 02_hand_00.txt, 02_hand_01.txt, 02_hand_02.txt, 02_hand_03.txt, 02_hand_04.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 1 ms | 3524 KB |
00_sample_01.txt | AC | 1 ms | 3524 KB |
01_random_00.txt | AC | 1 ms | 3472 KB |
01_random_01.txt | AC | 1 ms | 3424 KB |
01_random_02.txt | AC | 1 ms | 3420 KB |
01_random_03.txt | AC | 1 ms | 3476 KB |
01_random_04.txt | AC | 1 ms | 3456 KB |
01_random_05.txt | AC | 1 ms | 3484 KB |
01_random_06.txt | AC | 1 ms | 3384 KB |
01_random_07.txt | AC | 1 ms | 3408 KB |
01_random_08.txt | AC | 1 ms | 3416 KB |
01_random_09.txt | AC | 1 ms | 3472 KB |
01_random_10.txt | AC | 1 ms | 3468 KB |
01_random_11.txt | AC | 1 ms | 3464 KB |
01_random_12.txt | AC | 1 ms | 3512 KB |
01_random_13.txt | AC | 1 ms | 3476 KB |
01_random_14.txt | AC | 1 ms | 3392 KB |
02_hand_00.txt | AC | 1 ms | 3456 KB |
02_hand_01.txt | AC | 1 ms | 3476 KB |
02_hand_02.txt | AC | 1 ms | 3412 KB |
02_hand_03.txt | AC | 1 ms | 3380 KB |
02_hand_04.txt | AC | 1 ms | 3528 KB |