Language: C++



5 1
00010
5

1


1 3 1 1 1 1 4196462 1 -893093807 32767
4
F74076289@c-2018-1:~/test> 00010
If '00010' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf 00010
F74076289@c-2018-1:~/test> vi atcoder.cpp
F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
F74076289@c-2018-1:~/test> ./atcoder
5 1
00010
0
0
0
1
0


1
1


1
1


1 3 1 1 1 1 4196462 1 -803060511 32767
4
F74076289@c-2018-1:~/test> vi atcoder.cpp
F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
F74076289@c-2018-1:~/test> ./atcoder
5 1
00010


0
0
0
1
0


5 1
00010
5

1


0 1 3 1 1 1 4196462 1 -1229768207 32768
1
F74076289@c-2018-1:~/test> 00010
If '00010' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf 00010
F74076289@c-2018-1:~/test> vi atcoder.cpp
F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
F74076289@c-2018-1:~/test> ./atcoder
5 1
00010
0
0
1
0


1
1


1
1


2 1 1 1 1 1 4196434 1 1 10
3
F74076289@c-2018-1:~/test> vi atcoder.cpp
F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
F74076289@c-2018-1:~/test> ./atcoder
5 1
00010
0
0
1
0


5 1
00010
5

1


3 1 1 1 1 1 4196434 1 1 10
4
F74076289@c-2018-1:~/test> 00010
If '00010' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf 00010
F74076289@c-2018-1:~/test> vi atcoder.cpp
F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
F74076289@c-2018-1:~/test> ./atcoder
5 1
00010
0 0
1 0
2 1
3 0
4

1
5 1
6

1
7 1
8

3 1 1 1 1 1 4196434 1 1 10
4
F74076289@c-2018-1:~/test> vi atcoder.cpp
F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
F74076289@c-2018-1:~/test> ./atcoder
5 1
00010
5 10 0
1 0
2 1
3 0
4

^C
F74076289@c-2018-1:~/test> vi atcoder.cpp
F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
F74076289@c-2018-1:~/test> ./atcoder
5 1
00010
5 10
1
2
3
1 1 1 1 1
2
F74076289@c-2018-1:~/test> vi atcoder.cpp
F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
F74076289@c-2018-1:~/test>
F74076289@c-2018-1:~/test> ./atcoder
5 1
00010
0
1
2
3
3 1 1 0 0
4
F74076289@c-2018-1:~/test> 14 2
If '14' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf 14
F74076289@c-2018-1:~/test> 11101010110011
If '11101010110011' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf 11101010110011
F74076289@c-2018-1:~/test> 14 2
If '14' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf 14
F74076289@c-2018-1:~/test> 11101010110011
If '11101010110011' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf 11101010110011
F74076289@c-2018-1:~/test> ./atcoder
14 2
11101010110011
0
1
2
3
4
5
6
7
8
9
10
11
12
3 1 1 1 1 1 2 2 2 0 0 0 0 0
6
F74076289@c-2018-1:~/test> vi atcoder.cpp
F74076289@c-2018-1:~/test> 11101010110011
If '11101010110011' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf 11101010110011
F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
F74076289@c-2018-1:~/test> ./atcoder
14 2
11101010110011
0
1
2
3
4
5
6
7
8
9
10
11
12
3 1 1 1 1 1 2 2 2 0 0 0 0 0
5
6
F74076289@c-2018-1:~/test> vi atcoder.cpp
F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
F74076289@c-2018-1:~/test> ./atcoder
14 2
11101010110011
0
1
2
3
4
5
6
7
8
9
10
11
12
3 1 1 1 1 1 2 2 2 0 0 0 0 0
8
F74076289@c-2018-1:~/test> vi atcoder.cpp
  #include<cstdio>
  using namespace std;
  int main(){
      int n,k;
      char c,t;
      scanf("%d %d ",&n,&k);
      int a[n],ct=0;
      for(int i=0;i<n;i++){
          a[i]=0;
      }
      c=getchar();
      a[ct]++;
      for(int i=0;i<n-1;i++){
          t=getchar();
          printf("%d %c\n",i,n);
          if(t==c){
              a[ct]++;
          }else{
              ct++;
              a[ct]++;
          }
          c=t;
      }
      for(int i=0;i<n;i++){
          printf("%d ",a[i]);
      }
      printf("\n");
      int sum=0,max=0;
      for(int i=0;i<n;i++){
          sum+=a[i];
          if(i>=2*k+1)sum-=a[i-(2*k+1)];
          if(sum>max)max=sum;
      }
      printf("%d\n",max);
      return 0;
  }


Compiler output:
a.cc:12:10: error: stray '@' in program
   12 | F74076289@c-2018-1:~/test> 00010
      |          ^
a.cc:13:4: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   13 | If '00010' is not a typo you can use command-not-found to lookup the package that contains it, like this:
      |    ^~~~~~~
a.cc:15:10: error: stray '@' in program
   15 | F74076289@c-2018-1:~/test> vi atcoder.cpp
      |          ^
a.cc:16:10: error: stray '@' in program
   16 | F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
      |          ^
a.cc:17:10: error: stray '@' in program
   17 | F74076289@c-2018-1:~/test> ./atcoder
      |          ^
a.cc:37:10: error: stray '@' in program
   37 | F74076289@c-2018-1:~/test> vi atcoder.cpp
      |          ^
a.cc:38:10: error: stray '@' in program
   38 | F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
      |          ^
a.cc:39:10: error: stray '@' in program
   39 | F74076289@c-2018-1:~/test> ./atcoder
      |          ^
a.cc:60:10: error: stray '@' in program
   60 | F74076289@c-2018-1:~/test> 00010
      |          ^
a.cc:61:4: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   61 | If '00010' is not a typo you can use command-not-found to lookup the package that contains it, like this:
      |    ^~~~~~~
a.cc:63:10: error: stray '@' in program
   63 | F74076289@c-2018-1:~/test> vi atcoder.cpp
      |          ^
a.cc:64:10: error: stray '@' in program
   64 | F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
      |          ^
a.cc:65:10: error: stray '@' in program
   65 | F74076289@c-2018-1:~/test> ./atcoder
      |          ^
a.cc:84:10: error: stray '@' in program
   84 | F74076289@c-2018-1:~/test> vi atcoder.cpp
      |          ^
a.cc:85:10: error: stray '@' in program
   85 | F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
      |          ^
a.cc:86:10: error: stray '@' in program
   86 | F74076289@c-2018-1:~/test> ./atcoder
      |          ^
a.cc:104:10: error: stray '@' in program
  104 | F74076289@c-2018-1:~/test> 00010
      |          ^
a.cc:105:4: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
  105 | If '00010' is not a typo you can use command-not-found to lookup the package that contains it, like this:
      |    ^~~~~~~
a.cc:107:10: error: stray '@' in program
  107 | F74076289@c-2018-1:~/test> vi atcoder.cpp
      |          ^
a.cc:108:10: error: stray '@' in program
  108 | F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
      |          ^
a.cc:109:10: error: stray '@' in program
  109 | F74076289@c-2018-1:~/test> ./atcoder
      |          ^
a.cc:128:10: error: stray '@' in program
  128 | F74076289@c-2018-1:~/test> vi atcoder.cpp
      |          ^
a.cc:129:10: error: stray '@' in program
  129 | F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
      |          ^
a.cc:130:10: error: stray '@' in program
  130 | F74076289@c-2018-1:~/test> ./atcoder
      |          ^
a.cc:140:10: error: stray '@' in program
  140 | F74076289@c-2018-1:~/test> vi atcoder.cpp
      |          ^
a.cc:141:10: error: stray '@' in program
  141 | F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
      |          ^
a.cc:142:10: error: stray '@' in program
  142 | F74076289@c-2018-1:~/test> ./atcoder
      |          ^
a.cc:151:10: error: stray '@' in program
  151 | F74076289@c-2018-1:~/test> vi atcoder.cpp
      |          ^
a.cc:152:10: error: stray '@' in program
  152 | F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
      |          ^
a.cc:153:10: error: stray '@' in program
  153 | F74076289@c-2018-1:~/test>
      |          ^
a.cc:154:10: error: stray '@' in program
  154 | F74076289@c-2018-1:~/test> ./atcoder
      |          ^
a.cc:163:10: error: stray '@' in program
  163 | F74076289@c-2018-1:~/test> 14 2
      |          ^
a.cc:164:4: warning: multi-character character constant [-Wmultichar]
  164 | If '14' is not a typo you can use command-not-found to lookup the package that contains it, like this:
      |    ^~~~
a.cc:166:10: error: stray '@' in program
  166 | F74076289@c-2018-1:~/test> 11101010110011
      |          ^
a.cc:167:4: warning: multi-character literal with 14 characters exceeds 'int' size of 4 bytes
  167 | If '11101010110011' is not a typo you can use command-not-found to lookup the package that contains it, like this:
      |    ^~~~~~~~~~~~~~~~
a.cc:169:10: error: stray '@' in program
  169 | F74076289@c-2018-1:~/test> 14 2
      |          ^
a.cc:170:4: warning: multi-character character constant [-Wmultichar]
  170 | If '14' is not a typo you can use command-not-found to lookup the package that contains it, like this:
      |    ^~~~
a.cc:172:10: error: stray '@' in program
  172 | F74076289@c-2018-1:~/test> 11101010110011
      |          ^
a.cc:173:4: warning: multi-character literal with 14 characters exceeds 'int' size of 4 bytes
  173 | If '11101010110011' is not a typo you can use command-not-found to lookup the package that contains it, like this:
      |    ^~~~~~~~~~~~~~~~
a.cc:175:10: error: stray '@' in program
  175 | F74076289@c-2018-1:~/test> ./atcoder
      |          ^
a.cc:193:10: error: stray '@' in program
  193 | F74076289@c-2018-1:~/test> vi atcoder.cpp
      |          ^
a.cc:194:10: error: stray '@' in program
  194 | F74076289@c-2018-1:~/test> 11101010110011
      |          ^
a.cc:195:4: warning: multi-character literal with 14 characters exceeds 'int' size of 4 bytes
  195 | If '11101010110011' is not a typo you can use command-not-found to lookup the package that contains it, like this:
      |    ^~~~~~~~~~~~~~~~
a.cc:197:10: error: stray '@' in program
  197 | F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
      |          ^
a.cc:198:10: error: stray '@' in program
  198 | F74076289@c-2018-1:~/test> ./atcoder
      |          ^
a.cc:217:10: error: stray '@' in program
  217 | F74076289@c-2018-1:~/test> vi atcoder.cpp
      |          ^
a.cc:218:10: error: stray '@' in program
  218 | F74076289@c-2018-1:~/test> g++ atcoder.cpp -o atcoder
      |          ^
a.cc:219:10: error: stray '@' in program
  219 | F74076289@c-2018-1:~/test> ./atcoder
      |          ^
a.cc:237:10: error: stray '@' in program
  237 | F74076289@c-2018-1:~/test> vi atcoder.cpp
      |          ^
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 5 1
      | ^