提出 #58177683
ソースコード 拡げる
//yukicoder@cpp17
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <cctype>
#include <climits>
#include <cassert>
#include <string>
#include <vector>
#include <set>
#include <stack>
#include <queue>
#include <map>
#include <random>
#include <bitset>
#include <complex>
#include <utility>
#include <numeric>
#include <functional>
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
const ll MOD = 998244353;
const ll MODx = 1000000007;
const int INF = (1<<30)-1;
const ll LINF = (1LL<<62LL)-1;
const double EPS = (1e-10);
P ar4[4] = {{0,1},{0,-1},{1,0},{-1,0}};
P ar8[8] = {{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}};
template <typename T> vector<T> make_vector(size_t a, T b) { return vector<T>(a, b); }
template <typename... Ts> auto make_vector(size_t a, Ts... ts) { return vector<decltype(make_vector(ts...))>(a, make_vector(ts...)); }
/*
確認ポイント
cout << fixed << setprecision(n) << 小数計算//n桁の小数表記になる
計算量は変わらないが楽できるシリーズ
min(max)_element(iter,iter)で一番小さい(大きい)値のポインタが帰ってくる
count(iter,iter,int)でintがiterからiterの間にいくつあったかを取得できる
*/
/* comment outed because can cause bugs
__attribute__((constructor))
void initial() {
cin.tie(0);
ios::sync_with_stdio(false);
}
*/
int main(){
int ans = 0;
for(int i = 0; 12 > i; i++){
string s;cin>>s;
if(s.size() == i+1)ans++;
}
cout << ans << endl;
return 0;
}
提出情報
提出日時
2024-09-28 21:00:54+0900
問題
A - September
ユーザ
CleyL
言語
C++ 20 (gcc 12.2)
得点
100
コード長
1632 Byte
結果
AC
実行時間
1 ms
メモリ
3640 KiB
コンパイルエラー
Main.cpp: In function ‘int main()’:
Main.cpp:72:17: warning: comparison of integer expressions of different signedness: ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
72 | if(s.size() == i+1)ans++;
| ~~~~~~~~~^~~~~~
ジャッジ結果
セット名
Sample
All
得点 / 配点
0 / 0
100 / 100
結果
セット名
テストケース
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
ケース名
結果
実行時間
メモリ
00_sample_00.txt
AC
1 ms
3360 KiB
00_sample_01.txt
AC
1 ms
3640 KiB
01_random_00.txt
AC
1 ms
3356 KiB
01_random_01.txt
AC
1 ms
3556 KiB
01_random_02.txt
AC
1 ms
3476 KiB
01_random_03.txt
AC
1 ms
3452 KiB
01_random_04.txt
AC
1 ms
3484 KiB
01_random_05.txt
AC
1 ms
3416 KiB
01_random_06.txt
AC
1 ms
3444 KiB
01_random_07.txt
AC
1 ms
3524 KiB
01_random_08.txt
AC
1 ms
3476 KiB
01_random_09.txt
AC
1 ms
3448 KiB
01_random_10.txt
AC
1 ms
3424 KiB
01_random_11.txt
AC
1 ms
3556 KiB
01_random_12.txt
AC
1 ms
3456 KiB
01_random_13.txt
AC
1 ms
3472 KiB
01_random_14.txt
AC
1 ms
3428 KiB
02_hand_00.txt
AC
1 ms
3448 KiB
02_hand_01.txt
AC
1 ms
3556 KiB
02_hand_02.txt
AC
1 ms
3556 KiB
02_hand_03.txt
AC
1 ms
3448 KiB
02_hand_04.txt
AC
1 ms
3448 KiB