Submission #75973875


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
struct FastIO { FastIO(){ ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(12); } } fastio;

/*--------------------------------------------------*/
using i64 = int64_t;
using ll = int64_t;
using ld = long double;
template<typename T> using vc = vector<T>;
template<typename T> using vv = vc<vc<T>>;
template<typename T> using vvv = vc<vv<T>>;
template<typename T> using vvvv = vc<vvv<T>>;
template<typename T> using P = pair<T,T>;
template<typename T> using pq_ = priority_queue<T>;
template<typename T> using pq_g = priority_queue<T, vc<T>, greater<T>>;
using vi = vc<int>; using vvi = vc<vi>;
using Pi = P<int>;
/*--------------------------------------------------*/
#define pb push_back
#define em emplace
#define eb emplace_back
#define pob pop_back
#define el '\n'
#define YES cout<<"Yes"<<el
#define NO cout<<"No"<<el
#define NG cout<<-1<<el
#define ansNG( ans, ng, isEl ) if( ans == ng ){ cout<<-1; }else{ cout<<ans; } if( isEl ){ cout<<el; }else{ cout<<" "; }
#define all(a)  a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define rep(i,n)     for(int i = 0; i < (n); ++i)
#define rep3(i,l,r)  for(int i = (l); i < (r); ++i)
#define rrep(i,n)    for(int i = (n)-1; i >= 0; --i)
#define rrep3(i,l,r) for(int i = (r)-1; i >= (l); --i)
#define next_p(x) next_permutation( x )
/*--------------------------------------------------*/
template<typename T> inline bool chmin( T &a, T b ){ if( a > b ){ a = b; return true; } return false; }
template<typename T> inline bool chmax( T &a, T b ){ if( a < b ){ a = b; return true; } return false; }
template<typename T> istream& operator>>( istream& i, vc<T>& v ) { rep( j, size(v) ) i >> v[j]; return i; }
#define clog_bit( a, bit ) clog<< bitset<bit>(a) <<el;
#define clog_vc( v, e )  for( auto a1: v ){ if( a1 == e ){ clog<<"- "; }else{ clog<<a1<<" "; } } clog<<el;
#define clog_vv( v, e )  for( auto a2: v ){ clog_vc( a2, e ) };
#define clog_vvv( v, e ) for( auto a3: v ){ clog_vv( a3, e ); clog<<el; };
/*--------------------------------------------------*/
int INF    = 1e9+10;
int INF2   = 2e9+10;
ll INFLL = (ll)2e18+10;
const int m = 998244353; //m=1e9+7;
/*--------------------------------------------------*/

int main(){
    string S; cin>>S;
    int cnt = 0;

    if( S[0] == S[1] ){ ++cnt; }
    if( S[1] == S[2] ){ ++cnt; }
    if( S[2] == S[0] ){ ++cnt; }
    if( cnt == 0 ){ cout<<6<<el; }
    if( cnt == 1 ){ cout<<3<<el; }
    if( cnt == 3 ){ cout<<1<<el; }
}

Submission Info

Submission Time
Task B - Distinct Strings
User castle_
Language C++23 (Clang 21.1.0)
Score 100
Code Size 2567 Byte
Status AC
Exec Time 2 ms
Memory 2932 KiB

Compile Error

./Main.cpp:47:11: warning: unused variable 'm' [-Wunused-const-variable]
   47 | const int m = 998244353; //m=1e9+7;
      |           ^
1 warning generated.

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 10
Set Name Test Cases
Sample example0.txt, example1.txt, example2.txt
All 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, example0.txt, example1.txt, example2.txt
Case Name Status Exec Time Memory
000.txt AC 2 ms 2764 KiB
001.txt AC 1 ms 2748 KiB
002.txt AC 1 ms 2764 KiB
003.txt AC 1 ms 2848 KiB
004.txt AC 1 ms 2692 KiB
005.txt AC 1 ms 2932 KiB
006.txt AC 1 ms 2856 KiB
example0.txt AC 1 ms 2748 KiB
example1.txt AC 1 ms 2868 KiB
example2.txt AC 1 ms 2868 KiB