提出 #75973813


ソースコード 拡げる

#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;
    for( char c: S ){
        if( c == '0' ){ cout<<'1'; }
        if( c == '1' ){ cout<<'0'; }
    }
}

提出情報

提出日時
問題 A - flip
ユーザ castle_
言語 C++23 (Clang 21.1.0)
得点 100
コード長 2443 Byte
結果 AC
実行時間 2 ms
メモリ 2840 KiB

コンパイルエラー

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

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 3
AC × 8
セット名 テストケース
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_small_03.txt, 01_small_04.txt, 02_max_05.txt, 02_max_06.txt, 02_max_07.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 2 ms 2732 KiB
00_sample_01.txt AC 1 ms 2840 KiB
00_sample_02.txt AC 1 ms 2840 KiB
01_small_03.txt AC 1 ms 2704 KiB
01_small_04.txt AC 1 ms 2772 KiB
02_max_05.txt AC 1 ms 2772 KiB
02_max_06.txt AC 1 ms 2732 KiB
02_max_07.txt AC 1 ms 2672 KiB