Language: C++


Beta
 paiza.IO
??°????????????
?????§
???????????????
??\??¬???  ???????????¢?????? ?????°??????
C++ Split Button!	
Enter a title here
Main.cpp 
Success


35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
    for(i = 0 ; i < s ; i++){           //??????S???i???????????????????????????P????????????????????¨????????¨????????¢???
            result[i] = string_S[i] - string_P[0];
                
            if( result[i] == 0){    //???????????????????????£?????´?????????????????????????????????
                count = 0;
                sum   = 0;
                for (k =0; k < p; k++ ){
                    result[i+k] = string_S[i+k]-string_P[k];
                    sum += result[i+k];
                    count++;
                
                    if(sum == 0 && p == (count)){
                        answer=1;
                    }else {
                        answer=0;
                    }
                }
            }else {
            //??????????????????????¬????????????????
            }
    }
    if( answer == 1 ){
        printf("Yes");      //p??????????????´???
    }
    else {
        printf("No");       //p?????????????????´???
    }
        
    return 0;
}
  ?????? (Ctrl-Enter)
Save and Run
Split Button!                 
??????
??\???
???????????? 0
(0.00 sec)
 
Yes

Compiler output:
a.cc:4:3: error: extended character ° is not valid in an identifier
    4 | ??°????????????
      |   ^
a.cc:5:6: error: extended character § is not valid in an identifier
    5 | ?????§
      |      ^
a.cc:7:3: error: stray '\' in program
    7 | ??\??¬???  ???????????¢?????? ?????°??????
      |   ^
a.cc:7:6: error: extended character ¬ is not valid in an identifier
    7 | ??\??¬???  ???????????¢?????? ?????°??????
      |      ^
a.cc:7:23: error: extended character ¢ is not valid in an identifier
    7 | ??\??¬???  ???????????¢?????? ?????°??????
      |                       ^
a.cc:7:36: error: extended character ° is not valid in an identifier
    7 | ??\??¬???  ???????????¢?????? ?????°??????
      |                                    ^
a.cc:13:1: error: stray '\1' in program
   13 | <U+0001><U+0001>
      | ^~~~~~~~
a.cc:13:2: error: stray '\1' in program
   13 | <U+0001><U+0001>
      |         ^~~~~~~~
a.cc:80:3: error: stray '\' in program
   80 | ??\???
      |   ^
a.cc:2:1: error: 'Beta' does not name a type
    2 | Beta
      | ^~~~
a.cc:46:17: error: 'i' does not name a type
   46 |     for(i = 0 ; i < s ; i++){           //??????S???i???????????????????????????P????????????????????¨????????¨????????¢???
      |                 ^
a.cc:46:25: error: 'i' does not name a type
   46 |     for(i = 0 ; i < s ; i++){           //??????S???i???????????????????????????P????????????????????¨????????¨????????¢???
      |                         ^
a.cc:67:5: error: expected unqualified-id before 'if'
   67 |     if( answer == 1 ){
      |     ^~
a.cc:70:5: error: expected unqualified-id before 'else'
   70 |     else {
      |     ^~~~
a.cc:74:5: error: expected unqualified-id before 'return'
   74 |     return 0;
      |     ^~~~~~
a.cc:75:1: error: expected declaration before '}' token
   75 | }
      | ^
a.cc:76:3: error: expected unqualified-id before '?' token
   76 |   ?????? (Ctrl-Enter)
      |   ^