結果
| 問題 |
No.2268 NGワード回避
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2023-02-18 12:09:02 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 15 ms / 2,000 ms |
| コード長 | 1,038 bytes |
| コンパイル時間 | 569 ms |
| コンパイル使用メモリ | 68,512 KB |
| 最終ジャッジ日時 | 2025-02-10 18:50:12 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 52 |
ソースコード
#include <iostream>
#include <string>
#include <stdio.h>
#include <stdint.h>
using namespace std;
#define TYPE_OF( VAR ) remove_const<remove_reference<decltype( VAR )>::type >::type
#define UNTIE ios_base::sync_with_stdio( false ); cin.tie( nullptr )
#define CEXPR( LL , BOUND , VALUE ) constexpr LL BOUND = VALUE
#define CIN( LL , A ) LL A; cin >> A
#define ASSERT( A , MIN , MAX ) assert( ( MIN ) <= A && A <= ( MAX ) )
#define CIN_ASSERT( A , MIN , MAX ) CIN( TYPE_OF( MAX ) , A ); ASSERT( A , MIN , MAX )
#define FOR( VAR , INITIAL , FINAL_PLUS_ONE ) for( TYPE_OF( FINAL_PLUS_ONE ) VAR = INITIAL ; VAR < FINAL_PLUS_ONE ; VAR ++ )
#define QUIT return 0
#define RETURN( ANSWER ) cout << ( ANSWER ) << "\n"; QUIT
#include <cassert>
#define MAIN main
int MAIN()
{
UNTIE;
const string a = "a";
const string b = "b";
CEXPR( int , bound_N , 100000 );
CIN_ASSERT( N , 1 , bound_N );
FOR( i , 0 , N ){
CIN( string , S );
assert( S.size() == N );
cout << ( S.substr( i , 1 ) == a ? b : a );
}
RETURN( "" );
}