Language: C++

yoshinarinoMacBook-Air:competitive_programming yoshinari$ cd AtCoder/
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
50
10101000010011011110001001111110000101010111100110
10
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
7
1010101
2
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
10
1101101111
4
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
10
1101101111
6
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
7
1010101
3
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
7
1010101
2 2 1 1
2 3 2 2
3
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
7
1010101
1 1 1 0
2 2 1 1
2 3 2 2
3
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
7
1010101
1 1 0 0
1 2 1 1
2 2 2 2
2
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
10
1101101111
2 2 2 0
3 6 5 2
6
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
50
10101000010011011110001001111110000101010111100110
1 1 0 0
1 2 1 1
1 2 1 1
Segmentation fault: 11
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
max(max(dp[i-1][0], dp[i-1][1]), max(dp[i-1][2], dp[i-1][3]));
0 0 0 0
0
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
50
10101000010011011110001001111110000101010111100110
1 1 0 0
1 2 1 1
2 2 2 2
Segmentation fault: 11
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
^C
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
50
10101000010011011110001001111110000101010111100110
1 1 0 0
2
1 2 1 1
3
2 2 2 2
4
Segmentation fault: 11
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
50
10101000010011011110001001111110000101010111100110
1 1 0 0
2
11
1 2 1 1
3
10
2 2 2 2
4
00
Segmentation fault: 11
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
50
10101000010011011110001001111110000101010111100110
1 1 0 0
2
1 2 1 1
3
1 2 1 1
2 2 2 2
4
Segmentation fault: 11
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
50
10101000010011011110001001111110000101010111100110
1 1 0 0
2
1 2 1 1
3
OK
2 2 2 2
4
OK
Segmentation fault: 11
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
50
10101000010011011110001001111110000101010111100110
1 1 0 0
2
1 2 1 1
3
OK
2 2 2 2
4
OK
Segmentation fault: 11
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
cout << "OK" << endl;
0 805306368 0 805306368
805306368
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
50
10101000010011011110001001111110000101010111100110
1 1 0 0
2
1 2 1 1
3
OK
2 2 2 2
4
Segmentation fault: 11
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
50
10101000010011011110001001111110000101010111100110
1 1 0 0
2
1 2 1 1
3
0
1
2
3
OK
2 2 2 2
4
0
Segmentation fault: 11
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
50
10101000010011011110001001111110000101010111100110
1 1 0 0
2
1 2 1 1
3
0
1
2
3
OK
2 2 2 2
4
0
1
2
3
OK
2 2 2 2
5
0
1
2
3
OK
2 2 2 2
6
0
1
2
3
OK
2 2 2 2
7
0
1
2
3
OK
2 2 2 2
8
0
1
2
3
OK
2 2 2 2
9
4 6 5 2
10
0
1
2
3
OK
6 6 6 6
11
0
1
2
3
OK
6 6 6 6
12
0
1
2
3
OK
6 6 6 6
13
0
1
2
3
OK
6 6 6 6
14
0
1
2
3
OK
6 6 6 6
15
0
1
2
3
OK
6 6 6 6
16
0
1
2
3
OK
6 6 6 6
17
0
1
2
3
OK
6 6 6 6
18
0
1
2
3
OK
6 6 6 6
19
7 7 6 6
20
7 8 7 7
21
8 11 10 8
22
0
1
2
3
OK
11 11 11 11
23
0
1
2
3
OK
11 11 11 11
24
0
1
2
3
OK
11 11 11 11
11
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
50
10101000010011011110001001111110000101010111100110
1 1 0 0
2
1 2 1 1
3
2 2 2 2
4
2 2 2 2
5
2 2 2 2
6
2 2 2 2
7
2 2 2 2
8
2 2 2 2
9
4 6 5 2
10
6 6 6 6
11
6 6 6 6
12
6 6 6 6
13
6 6 6 6
14
6 6 6 6
15
6 6 6 6
16
6 6 6 6
17
6 6 6 6
18
6 6 6 6
19
7 7 6 6
20
7 8 7 7
21
8 11 10 8
22
11 11 11 11
23
11 11 11 11
24
11 11 11 11
11
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
50
10101000010011011110001001111110000101010111100110
1 1 0 0
1 2 1 1
2 2 2 2
2 2 2 2
2 2 2 2
2 2 2 2
2 2 2 2
2 2 2 2
4 6 5 2
6 6 6 6
6 6 6 6
6 6 6 6
6 6 6 6
6 6 6 6
6 6 6 6
6 6 6 6
6 6 6 6
6 6 6 6
7 7 6 6
7 8 7 7
8 11 10 8
11 11 11 11
11 11 11 11
11 11 11 11
11
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
50
10101000010011011110001001111110000101010111100110
1 1 0 0
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
3 5 4 1
5 5 5 5
5 5 5 5
5 5 5 5
5 5 5 5
5 5 5 5
5 5 5 5
5 5 5 5
5 5 5 5
5 5 5 5
6 6 5 5
6 6 6 6
7 10 9 6
10 10 10 10
10 10 10 10
10 10 10 10
10
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
50
10101000010011011110001001111110000101010111100110
1 1 0 0
10
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
7
1010101
1 1 0 0
2
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
50
10101000010011011110001001111110000101010111100110
10
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out


500000
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111^C
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
10
11111111111
0
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
5
11111
0
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
CodeFestival2017qualBD.cpp:71:87: error: extraneous ')' before ';'
            dp[i][0] = max(dp[i-1][0]+ones[i-1]-1, dp[i-1][2]+1), dp[i-1][3]+ones[i-1]);
                                                                                      ^
CodeFestival2017qualBD.cpp:71:77: warning: expression result unused [-Wunused-value]
            dp[i][0] = max(dp[i-1][0]+ones[i-1]-1, dp[i-1][2]+1), dp[i-1][3]+ones[i-1]);
                                                                  ~~~~~~~~~~^~~~~~~~~~
1 warning and 1 error generated.
yoshinarinoMacBook-Air:AtCoder yoshinari$ g++ -Wall CodeFestival2017qualBD.cpp -std=c++14
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.ou
bash: ./a.ou: No such file or directory
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
7
1010101
2
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
50
10101000010011011110001001111110000101010111100110
10
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
5
11111
0
yoshinarinoMacBook-Air:AtCoder yoshinari$ ./a.out
5
11101
3
yoshinarinoMacBook-Air:AtCoder yoshinari$

Compiler output:
a.cc:5:1: warning: integer constant is too large for its type
    5 | 10101000010011011110001001111110000101010111100110
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:55:1: warning: integer constant is too large for its type
   55 | 10101000010011011110001001111110000101010111100110
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:67:1: warning: integer constant is too large for its type
   67 | 10101000010011011110001001111110000101010111100110
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:77:1: warning: integer constant is too large for its type
   77 | 10101000010011011110001001111110000101010111100110
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:88:1: warning: integer constant is too large for its type
   88 | 10101000010011011110001001111110000101010111100110
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:102:1: warning: integer constant is too large for its type
  102 | 10101000010011011110001001111110000101010111100110
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:114:1: warning: integer constant is too large for its type
  114 | 10101000010011011110001001111110000101010111100110
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:127:1: warning: integer constant is too large for its type
  127 | 10101000010011011110001001111110000101010111100110
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:144:1: warning: integer constant is too large for its type
  144 | 10101000010011011110001001111110000101010111100110
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:156:1: warning: integer constant is too large for its type
  156 | 10101000010011011110001001111110000101010111100110
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:173:1: warning: integer constant is too large for its type
  173 | 10101000010011011110001001111110000101010111100110
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:315:1: warning: integer constant is too large for its type
  315 | 10101000010011011110001001111110000101010111100110
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:367:1: warning: integer constant is too large for its type
  367 | 10101000010011011110001001111110000101010111100110
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:396:1: warning: integer constant is too large for its type
  396 | 10101000010011011110001001111110000101010111100110
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:425:1: warning: integer constant is too large for its type
  425 | 10101000010011011110001001111110000101010111100110
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:436:1: warning: integer constant is too large for its type
  436 | 10101000010011011110001001111110000101010111100110
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:442:1: warning: integer constant is too large for its type
  442 | 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111^C
      | ^~~~~~~~~~~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: integer constant is too large for its type
  468 | 10101000010011011110001001111110000101010111100110
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:1:1: error: 'yoshinarinoMacBook' does not name a type
    1 | yoshinarinoMacBook-Air:competitive_programming yoshinari$ cd AtCoder/
      | ^~~~~~~~~~~~~~~~~~
a.cc:63:1: error: expected unqualified-id before numeric constant
   63 | 0 0 0 0
      | ^
a.cc:140:1: error: expected unqualified-id before numeric constant
  140 | 0 805306368 0 805306368
      | ^
a.cc:454:87: error: expected unqualified-id before '^' token
  454 |                                                                                       ^
      |                                                                                       ^
a.cc:457:68: error: expected class-name before '~' token
  457 |                                                                   ~~~~~~~~~~^~~~~~~~~~
      |                                                                    ^