提出 #38782401
ソースコード 拡げる
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
#define chmax(x,y) x = max(x,y);
#define chmin(x,y) x = min(x,y);
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};
const int INF = 1001001001;
const ll LINF = 1001002003004005006ll;
const double PI = acos(-1);
int main() {
string s;
cin >> s;
rep(i,s.size()) {
if (s[i] == '0') s[i] = '1';
else s[i] = '0';
}
cout << s << endl;
return 0;
}
提出情報
コンパイルエラー
./Main.cpp: In function ‘int main()’:
./Main.cpp:4:36: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
4 | #define rep(i,n) for (int i = 0; i < (n); ++i)
| ^
./Main.cpp:21:5: note: in expansion of macro ‘rep’
21 | rep(i,s.size()) {
| ^~~
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 100 / 100 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| 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 | 8 ms | 3488 KiB |
| 00_sample_01.txt | AC | 2 ms | 3564 KiB |
| 00_sample_02.txt | AC | 2 ms | 3620 KiB |
| 01_small_03.txt | AC | 2 ms | 3492 KiB |
| 01_small_04.txt | AC | 2 ms | 3428 KiB |
| 02_max_05.txt | AC | 2 ms | 3532 KiB |
| 02_max_06.txt | AC | 2 ms | 3488 KiB |
| 02_max_07.txt | AC | 2 ms | 3608 KiB |