提出 #72574661


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; }
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pair<int,int>>
#define vll vector<pair<ll,ll>>
#define vvi vector<vector<int>>
#define vvl vector<vector<ll>>
#define vvii vector<vector<pair<int,int>>>
#define vvll vector<vector<pair<ll,ll>>>
#define vst vector<string>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define mkunique(x) sort(all(x));(x).erase(unique(all(x)),(x).end())
#define fi first
#define se second
#define mp make_pair
#define si(x) int(x.size())
const int mod=998244353,MAX=300005,INF=15<<26;

int main(){
    
    std::ifstream in("text.txt");
    std::cin.rdbuf(in.rdbuf());
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    
    int N;cin>>N;
    string S;cin>>S;
    int ans=0;
    for(int i=0;i<N;i++){
        for(int j=i+1;j<N;j++){
            for(int k=j+1;k<N;k++){
                if(S[i]=='E'&&S[j]=='G'&S[k]=='F') ans++;
            }
        }
    }
    cout<<ans<<endl;
    
}


提出情報

提出日時
問題 C - EGFカウント
ユーザ guild2026_099
言語 C++ IOI-Style(GNU++20) (GCC 14.2.0)
得点 100
コード長 1308 Byte
結果 AC
実行時間 1 ms
メモリ 1704 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 3
AC × 18
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.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
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 0 ms 1704 KiB
00_sample_01.txt AC 0 ms 1704 KiB
00_sample_02.txt AC 0 ms 1704 KiB
01_random_00.txt AC 0 ms 1704 KiB
01_random_01.txt AC 1 ms 1704 KiB
01_random_02.txt AC 0 ms 1704 KiB
01_random_03.txt AC 0 ms 1704 KiB
01_random_04.txt AC 0 ms 1704 KiB
01_random_05.txt AC 0 ms 1704 KiB
01_random_06.txt AC 0 ms 1704 KiB
01_random_07.txt AC 1 ms 1704 KiB
01_random_08.txt AC 0 ms 1704 KiB
01_random_09.txt AC 0 ms 1704 KiB
01_random_10.txt AC 0 ms 1704 KiB
01_random_11.txt AC 0 ms 1704 KiB
01_random_12.txt AC 0 ms 1704 KiB
01_random_13.txt AC 0 ms 1704 KiB
01_random_14.txt AC 1 ms 1704 KiB