submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s413699389 | p04032 | C++ | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
int N = s.length();
char[] c = s.toCharArray();
int a = 0;
int b = 0;
for (int i=1;i<N;i++) {
if (c[i]==c[i-1]) {
System.out.println(i + " " + (i+1));
re... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s239637754 | p04032 | C++ | #include <iostream>
#include <vector>
#include <map>
using namespace std;
int main(){
string V;
cin >> s;
bool balanced = false;
int a, b;
int N = s.size();
for(int i = 0; i < N-1; i++){
if(s[i] == s[i+1]){
balanced = true;
a = i, b = i+1;
}
}
for(int i = 0; i < N-2; i++){
i... | a.cc: In function 'int main()':
a.cc:9:10: error: 's' was not declared in this scope
9 | cin >> s;
| ^
|
s984553028 | p04032 | C++ | #include <iostream>
#include <vector>
#include <map>
using namespace std;
int main(){
string V;
cin >> s;
bool balanced = false;
int a, b;
for(int i = 0; i < N-1; i++){
if(s[i] == s[i+1]){
balanced = true;
a = i, b = i+1;
}
}
for(int i = 0; i < N-2; i++){
if(s[i] == s[i+2] && ... | a.cc: In function 'int main()':
a.cc:9:10: error: 's' was not declared in this scope
9 | cin >> s;
| ^
a.cc:13:22: error: 'N' was not declared in this scope
13 | for(int i = 0; i < N-1; i++){
| ^
a.cc:19:22: error: 'N' was not declared in this scope
19 | for(int... |
s874725184 | p04032 | C++ | #include <iostream>
#include <vector>
#include <map>
using namespace std;
int main(){
string V;
cin >> s;
bool valanced = false;
int a, b;
for(int i = 0; i < N-1; i++){
if(s[i] == s[i+1]){
valanced = true;
a = i, b = i+1;
}
}
for(int i = 0; i < N-2; i++){
if(s[i] == s[i+2] && ... | a.cc: In function 'int main()':
a.cc:9:10: error: 's' was not declared in this scope
9 | cin >> s;
| ^
a.cc:13:22: error: 'N' was not declared in this scope
13 | for(int i = 0; i < N-1; i++){
| ^
a.cc:19:22: error: 'N' was not declared in this scope
19 | for(int... |
s926869837 | p04032 | C++ | #include <iostream>
int main(){
std::cout << "2 4" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:4:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
4 | std::cout << "2 4" << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/us... |
s305402766 | p04032 | C++ | #include <iostream>
int main(){
cout << "2 4" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:4:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
4 | cout << "2 4" << endl;
| ^~~~
| std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ... |
s596099270 | p04032 | C++ | #include<bits/stdc++h.>
using namespace std;
int main()
{
string s;
cin>>s;
int siz=s.size();
for(int i=0;i<siz-1;i++)
{
if(s[i]==s[i+1])
{
cout<<i+1<<" "<<i+2;
return 0;
}
}
for(int i=0;i<siz-2;i++)
{
if(s[i]==s[i+2])
{
cout<<i+1<<" "<<i+3;
return 0;
... | a.cc:1:9: fatal error: bits/stdc++h.: No such file or directory
1 | #include<bits/stdc++h.>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s145097435 | p04032 | Java | import java.util.*;
public class Main {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
int n = s.length();
char[] a = new char[n];
a = s.toCharArray();
int r = (int)Math.pow(2, m);
int k = m / 2 + (m % 2 == 1 ? 1 : 0);
for (int... | Main.java:13: error: cannot find symbol
int r = (int)Math.pow(2, m);
^
symbol: variable m
location: class Main
Main.java:14: error: cannot find symbol
int k = m / 2 + (m % 2 == 1 ? 1 : 0);
^
symbol: variable m
location: class Main
Main.java:14: error: cannot ... |
s469736843 | p04032 | C++ | #include <algorithm>
#include <iostream>
#include <numeric>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
using ll = long long;
constexpr static ll MOD = 1000000007ll;
constexpr static int INF = 1 << 28; // for x <= 10^9
constexpr static ll INFL = 1ll << 60; // for x <= 10^19
int ... | a.cc: In function 'int main()':
a.cc:19:11: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long uns... |
s768402410 | p04032 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
cin>>s;
int len=strlen(s);
bool flag=0;
for(int i=0;i<len;i++){
if(s[i]==s[i+1]){
printf("%d %d\n",i+1,i+2);
flag=1;
break;
}
else if(s[i]==s[i+2]){
printf("%d %d\n",i+1,i+3);
flag=1;
break;
}
}
if(!flag) printf("-1 -1\n");
retu... | a.cc: In function 'int main()':
a.cc:5:14: error: 's' was not declared in this scope
5 | cin>>s;
| ^
|
s216256627 | p04032 | C | #include "bits/stdc++.h"
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=int(a),i##_len=(b);i<i##_len;++i)
#define BUGAVOID(x) x
#define rep(...) BUGAVOID(_overload3(__VA_ARGS__,repi,_rep,_rep)(__VA_ARGS__))
#define all(c) c.begin(),c.end()
#define mp make_pair
#de... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include "bits/stdc++.h"
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s461777292 | p04032 | C++ | #include<bits/stdc++.h>
using namespace std;
#define boost ios::sync_with_stdio(0); cin.tie(0);
#define int long long
const int N = 1e5 + 10;
const int MOD = 1e9 + 7;
int main(){
boost;
string s;
cin >> s;
for(int i = 0 ; i < s.length()-1 ; ++i){
if(s[i] == s[i+1]){
cout << i+1 << " " << ... | cc1plus: error: '::main' must return 'int'
|
s173851422 | p04032 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
typedef unsigned long ul;
typedef long long ll;
//typedef pair<int, int> mpair;
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
string s;cin >> s;
rep(i, s.length()-2){
if(s[i] == s[i+2]){
printf(... | a.cc: In function 'int main()':
a.cc:21:10: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long uns... |
s016964596 | p04032 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int i;
string s;
cin >> s;
for(i=1; i<s.size(); i++){
if(s[i-1] == s[i]){
cout << i << ' ' << i+1;
return 0;
}
}
cout << "-1 -1"
return 0;
} | a.cc: In function 'int main()':
a.cc:14:20: error: expected ';' before 'return'
14 | cout << "-1 -1"
| ^
| ;
15 | return 0;
| ~~~~~~
|
s710217018 | p04032 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int i;
string s;
cin >> s;
for(i=1; i<n; i++){
if(s[i-1] == s[i]){
cout << i << ' ' << i+1;
return 0;
}
}
cout << "-1 -1"
return 0;
} | a.cc: In function 'int main()':
a.cc:8:16: error: 'n' was not declared in this scope
8 | for(i=1; i<n; i++){
| ^
a.cc:14:20: error: expected ';' before 'return'
14 | cout << "-1 -1"
| ^
| ;
15 | return 0;
| ~~~~~~ ... |
s460876346 | p04032 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int i;
cin >> s;
for(i=1; i<n; i++){
if(s[i-1] == s[i]){
cout << i << ' ' << i+1;
return 0;
}
}
cout << "-1 -1"
return 0;
} | a.cc: In function 'int main()':
a.cc:6:12: error: 's' was not declared in this scope
6 | cin >> s;
| ^
a.cc:7:16: error: 'n' was not declared in this scope
7 | for(i=1; i<n; i++){
| ^
a.cc:13:20: error: expected ';' before 'return'
13 | cout << "-1 -1"
... |
s755016115 | p04032 | C++ | s = gets.chomp
# num = ('a'..'z').to_a.map{|a| [a,0]}.to_h
# s.chars.each_with_index do |b,i|
# num[b] = i
# end
s = s.chars
s.each_with_index do |b,i|
if b == s[i + 1]
puts i+1,i+2
exit
elsif b == s[i + 2]
puts i+1,i+3
exit
end
end
puts "-1 -1"
| a.cc:2:3: error: invalid preprocessing directive #num
2 | # num = ('a'..'z').to_a.map{|a| [a,0]}.to_h
| ^~~
a.cc:3:3: error: invalid preprocessing directive #s
3 | # s.chars.each_with_index do |b,i|
| ^
a.cc:4:5: error: invalid preprocessing directive #num
4 | # num[b] = i
| ^~~
... |
s242304926 | p04032 | Java | import java.io.*;
import java.lang.*;
import java.util.*;
public class Main{
public static void main(String args[]){
String S = new Scanner(System.in).nextLine();
for(int i = 0; i < S.length(); i++){
for(int j = i; j < S.length()-i; j++){
String[] s = S.substring(i,j).split("");
Set<Str... | Main.java:12: error: cannot find symbol
if((s.count(c) > s.length/2) && s.length > 1){
^
symbol: method count(String)
location: variable s of type String[]
1 error
|
s330810179 | p04032 | C++ | #include <bits/stdc++.h>
using namespace std;
using lnt = long long;
template <class T> using SET = unordered_set<T>;
template <class T, class S> using MAP = unordered_map<T, S>;
#define LOOP(n) for (lnt _ = 0; _ < (n); _++)
#define REP(i, n) for (lnt i = 0; i < (n); i++) // 0, 1, ..., n-1
#define INVREP(i... | a.cc: In function 'int main()':
a.cc:307:16: error: 'Dist' was not declared in this scope
307 | lnt j1 = Dist(vcDist.begin(), find(ALL(vcDist), 1));
| ^~~~
a.cc:313:16: error: 'Dist' was not declared in this scope
313 | lnt j2 = Dist(vcDist.begin(), find(ALL(vcDist), 2));
| ... |
s973074455 | p04032 | C++ | #include <bits/stdc++.h>
using namespace std;
using lnt = long long;
template <class T> using SET = unordered_set<T>;
template <class T, class S> using MAP = unordered_map<T, S>;
#define LOOP(n) for (lnt _ = 0; _ < (n); _++)
#define REP(i, n) for (lnt i = 0; i < (n); i++) // 0, 1, ..., n-1
#define INVREP(i... | a.cc: In function 'int main()':
a.cc:307:57: error: expected ')' before ';' token
307 | lnt j1 = Dist(vcDist.begin(), find(ALL(vcDist), 1);
| ~ ^
| )
a.cc:313:16: error: 'Dist' was not decla... |
s841247200 | p04032 | C++ | #include <bits/stdc++.h>
using namespace std;
using lnt = long long;
template <class T> using SET = unordered_set<T>;
template <class T, class S> using MAP = unordered_map<T, S>;
#define LOOP(n) for (lnt _ = 0; _ < (n); _++)
#define REP(i, n) for (lnt i = 0; i < (n); i++) // 0, 1, ..., n-1
#define INVREP(i... | a.cc: In function 'int main()':
a.cc:307:20: error: cannot convert '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >' to 'lnt' {aka 'long long int'} in initialization
307 | lnt j1 = find(ALL(vcDist), 1);
| ~~~~^~~~~~~~~~~~~~~~
| |
| ... |
s191366615 | p04032 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
for (int i = 0; i < S.size() - 1; i++) {
if (S[i] == S[i + 1]) {
cout << i << " " << i + 1 << "\n";
return 0;
}
}
for (int i = 0; i < S.size() - 2; i++) {
if (S[i] == S[i + 2]) {
cout << i << " " << i... | a.cc: In function 'int main()':
a.cc:15:40: error: expected ';' before ':' token
15 | cout << i << " " << i + 2 << "\n":
| ^
| ;
|
s344826449 | p04032 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
int n=s.length();
for(int i=0;i<n-1;i++)
if(s[i]==s[i+1]){cout<<i+1<<" "<<i+2<<endl;return 0;}
for(int i=0;i<n-2;i++)
if(s[i]==s[i+2]){cout<<i+1<<" "<<i+3<<endl;return 0:
}
cout<<"-1 -1\n";
retur... | a.cc: In function 'int main()':
a.cc:13:56: error: expected ';' before ':' token
13 | if(s[i]==s[i+2]){cout<<i+1<<" "<<i+3<<endl;return 0:
| ^
| ;
a.cc:13:56: error: expected primary-expressi... |
s049427183 | p04032 | C++ | #include<cstring>
using namespace std;
int main(){
string s;
cin>>s;
int l=s.length();
for(int i=0;i<l-2;i++){
if(s[i]==s[i+1]){
cout<<i+1<<" "<<i+2;
return 0;
}
else if(s[i]==s[i+2]){
cout<<i+1<<" "<<i+3;
return 0;
}
}
if(s[l-2]==s[l-1]){
cout<<l-1<<" "<<l;
return 0;
}
cout<<-1<<" "<<-... | a.cc: In function 'int main()':
a.cc:4:9: error: 'string' was not declared in this scope
4 | string s;
| ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
1 | #include<cstring>
+++ |+#include <string>
2 | usin... |
s472357708 | p04032 | C++ | #include<iostream>
using namespace std;
int main()
{
int n
cin>>n;
int a[n+1];
for(int i=1;i<=n;i++)
cin>>a[i];
do{
}while(1);
cout<<a[1];
return 0;
} | a.cc: In function 'int main()':
a.cc:6:1: error: expected initializer before 'cin'
6 | cin>>n;
| ^~~
a.cc:7:7: error: 'n' was not declared in this scope
7 | int a[n+1];
| ^
a.cc:9:6: error: 'a' was not declared in this scope
9 | cin>>a[i];
| ^
a.cc:12:7: error: 'a' was not decla... |
s105875193 | p04032 | C++ | #include <bits/stdc++.h>
#define FOR(i, begin, end) for(int i=(begin);i<(end);i++)
#define REP(i, n) FOR(i,0,n)
#define IFOR(i, begin, end) for(int i=(end)-1;i>=(begin);i--)
#define IREP(i, n) IFOR(i,0,n)
#define SORT(a) sort(a.begin(), a.end())
#define REVERSE(a) reverse(a.begin(), a.end())
#define Lower_bound(v, x) d... | a.cc: In function 'int main()':
a.cc:29:19: error: expected ';' before string constant
29 | cout << -1 " " << -1;
| ^~~~
| ;
|
s977829333 | p04032 | C++ |
#include<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<cstring>
using namespace std;
#define REP(i, a,b) for(i=a;i<b;i++)
#define output(x) cout<<x<<endl;
int par[100001];
void init(int n) {
for (int i = 0; i < n; i++) {
par[i] = i;
}
}
//木の根を求める
int root(int x) {
if (par[x] == x)
r... | a.cc: In function 'int main()':
a.cc:60:9: error: 'else' without a previous 'if'
60 | else
| ^~~~
|
s402157660 | p04032 | C++ | // ConsoleApplication71.cpp : アプリケーションのエントリ ポイントを定義します。
//
#include "stdafx.h"
#include<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<cstring>
using namespace std;
#define REP(i, a,b) for(i=a;i<b;i++)
#define output(x) cout<<x<<endl;
int par[100001];
void init(int n) {
for (int i = 0; i <... | a.cc:4:10: fatal error: stdafx.h: No such file or directory
4 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s717816537 | p04032 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
for(int i=0;i<=s.size();i++)
{
if(s[i]==s[i+1])
{
cout<<i+1<<" "<<i+2;
return 0;
}
}
if(s.size()>=3)
{
for(int i=0;i<=s.size()-1)
if(s[i]==s[i+1])
{
cout<<i+1<<" "<<i+3;
return 0;
}
}
cout<<-1<<" "<<-1;
retur... | a.cc: In function 'int main()':
a.cc:17:42: error: expected ';' before ')' token
17 | for(int i=0;i<=s.size()-1)
| ^
| ;
|
s142631570 | p04032 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <limits.h>
int main(void){
char s[100200];
scanf("%s",s);
for (int i=1; i<strlen(s); i++){
if (s[i]==s[i-1]){
printf("%d %d\n",i,i+1);
return 0;
}
}
for... | main.c: In function 'main':
main.c:23:22: error: expected ';' before 'return'
23 | printf("-1 -1\n")
| ^
| ;
24 | return 0 ;
| ~~~~~~
|
s572586429 | p04032 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <limits.h>
int main(void){
char s[100200];
scanf("%s",s);
for (int i=1; i<strlen(s); i++){
if (s[i]==s[i-1]){
printf("%d %d\n",i,i+1);
return 0;
}
}
for... | main.c: In function 'main':
main.c:29:22: error: expected ';' before 'return'
29 | printf("-1 -1\n")
| ^
| ;
30 | return 0 ;
| ~~~~~~
|
s968352320 | p04032 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin >> s;
for(int i=0:i<n-1;i++)
{
if(s[i] == s[i+1])
{
cout << i+1 << " " << i+2 << endl;
return 0;
}
}
for(int i=0:i<n-2;i++)
{
if(s[i] == s[i+2])
{
... | a.cc: In function 'int main()':
a.cc:10:14: error: initializer in range-based 'for' loop
10 | for(int i=0:i<n-1;i++)
| ^
a.cc:10:19: error: 'n' was not declared in this scope
10 | for(int i=0:i<n-1;i++)
| ^
a.cc:10:22: error: expected ')' before ';' token
10 |... |
s134689097 | p04032 | Java | ddd | Main.java:1: error: reached end of file while parsing
ddd
^
1 error
|
s227988131 | p04032 | C++ | #include <iostream>
#include <string>
#include <cstdio>
using namespace std;
int main()
{
char s[100000];
scanf("%s",s);
for(int i=0;i+1<s.size();i++)
{
if(s[i]==s[i+1])
{
... | a.cc: In function 'int main()':
a.cc:9:31: error: request for member 'size' in 's', which is of non-class type 'char [100000]'
9 | for(int i=0;i+1<s.size();i++)
| ^~~~
a.cc:16:36: error: request for member 'size' in 's', which is of non-class type 'char [100000]'
1... |
s755524669 | p04032 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
int main()
{
string s;
scanf("%s",s);
for(int i=0;i+1<s.size();i++)
{
if(s[i]==s[i+1])
{
printf("%d %d",i+1,i+2);
return 0;
}
if(s[i]==s[i+2]&&i+2<s.size)
{
printf("%d %d",i+1,i+3);
return 0;
}
}
printf("-1 -1");
return 0;
} | a.cc: In function 'int main()':
a.cc:15:24: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsig... |
s887129734 | p04032 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
if(s.size() == 1){
cout << "-1 -1\n";
return 0;
}
for(ll i = 0; i < s.size() - 1; i++){
if(s[i] == s[i + 1]){
cout << i + 1 << " " << i + 2 << endl;
return 0;
}
}
cout << "-1 -1\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:9:7: error: 'll' was not declared in this scope
9 | for(ll i = 0; i < s.size() - 1; i++){
| ^~
a.cc:9:17: error: 'i' was not declared in this scope
9 | for(ll i = 0; i < s.size() - 1; i++){
| ^
|
s657433649 | p04032 | C++ | #include <iostream>
int main() {
std::cout << 1 << " " << 3 << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:35: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
5 | std::cout << 1 << " " << 3 << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41,
... |
s896439427 | p04032 | C++ | process.stdin.resume();
process.stdin.setEncoding('ascii');
var input_stdin = "";
var input_stdin_array = "";
var input_currentline = 0;
process.stdin.on('data', function (data) {
input_stdin += data;
});
process.on('SIGINT', function(){
input_stdin_array = input_stdin.split("\n");
main();
process.ex... | a.cc:2:27: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
2 | process.stdin.setEncoding('ascii');
| ^~~~~~~
a.cc:8:18: warning: multi-character character constant [-Wmultichar]
8 | process.stdin.on('data', function (data) {
| ... |
s419025869 | p04032 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#pragma region defins
#define ll long long
#define loop(i,n) for (int i = 0; i < n; i++)
#define loops(i,f,n) for (int i = (f); i < n; i++)
#define INF 100000000000000
#define sort(a) sort(a.begin(),a.end())
#define rsort(a) sort(a.rbegin(),a.rend... | a.cc: In function 'int main()':
a.cc:18:14: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long uns... |
s201782122 | p04032 | C++ | #include<stdio.h>
#include<string.h>
#include<algorithm>
#include<math.h>
#define pi acos(-1.0)
using namespace std;
int main() {
int s = -1, e = -1;
char str[100000+5]
scanf("%s", str);
int len = strlen(str);
for(int i = 0; str[i]; i++) {
if(str[i] == str[i + 1]) {
s = i + 1;
e = i + 2;
break;
... | a.cc: In function 'int main()':
a.cc:11:9: error: expected initializer before 'scanf'
11 | scanf("%s", str);
| ^~~~~
a.cc:12:26: error: 'str' was not declared in this scope; did you mean 'std'?
12 | int len = strlen(str);
| ^~~
| ... |
s969605284 | p04032 | C++ | #include<cstdio>
#include<string>
#include<cstring>
using namespace std;
int main()
{
char s[100100];
int a[26];
int f=0,i;
gets(s);
int len =strlen(s);
for(i=2;i<len ;i++)
{
if(s[i-2]==s[i-1]||s[i-2]==s[i]||s[i-1]==a[i])
{
f=1;
break;
}
}... | a.cc: In function 'int main()':
a.cc:10:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(s);
| ^~~~
| getw
|
s161826813 | p04032 | Java | import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.BigDecimal;
public class BC43D {
public static void main (String[] args) throws java.lang.Exception {
InputReader in = new InputReader(System.in);
PrintWriter w = new PrintWriter(System.out);
char[] ca = in.next().t... | Main.java:6: error: class BC43D is public, should be declared in a file named BC43D.java
public class BC43D {
^
1 error
|
s715438099 | p04032 | C++ | /#define M_PI 3.14159265358979323846
#define _USE_MATH_DEFINES
//#define _GLIBCXX_DEBUG
//#define all(x) (x).begin(),(x).end()
#include <bits/stdc++.h>
#define TASK ""
#define sqr(x) ((x)*(x))
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
using namespace std;
const ll INFLL = numer... | a.cc:1:2: error: stray '#' in program
1 | /#define M_PI 3.14159265358979323846
| ^
a.cc:1:1: error: expected unqualified-id before '/' token
1 | /#define M_PI 3.14159265358979323846
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algor... |
s405957078 | p04032 | C++ | // 0526.cpp : 定义控制台应用程序的入口点。
//
#define gets(str) gets_s(str)
#include <stdio.h>
#include <iostream>
#include <string.h>
#include <string>
#include <algorithm>
#include <queue>
#define INF 999999
using namespace std;
struct PP
{
char ch;
int s, t, num;
}p[130];
bool operator < (PP a, PP b)
{
return a.num>b.num;
}
... | a.cc: In function 'int main()':
a.cc:3:19: error: 'gets_s' was not declared in this scope; did you mean 'gets'?
3 | #define gets(str) gets_s(str)
| ^~~~~~
a.cc:26:9: note: in expansion of macro 'gets'
26 | gets(s);
| ^~~~
|
s497015808 | p04032 | C++ | // 0526.cpp : 定义控制台应用程序的入口点。
//
#include <stdio.h>
#include <iostream>
#include <string.h>
#include <string>
#include <algorithm>
#include <queue>
#define INF 999999
using namespace std;
struct PP
{
char ch;
int s, t, num;
}p[130];
bool operator < (PP a, PP b)
{
return a.num>b.num;
}
int main()
{
char s[100005];
... | a.cc: In function 'int main()':
a.cc:25:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
25 | gets(s);
| ^~~~
| getw
|
s594422915 | p04032 | C++ |
#include <cstdio>
#include <algorithm>
using namespace std;
#define REP(i, n) for(int i = 0; i < (int)(n); ++i)
char buf[100000+10];
int main(void) {
scanf("%s", buf);
int n = strlen(buf);
REP(i, n) {
if(i+1 < n && buf[i] == buf[i+1]) {
printf("%d %d\n", i+1, i+2);
return 0;
} else if(i+2 <... | a.cc: In function 'int main()':
a.cc:11:11: error: 'strlen' was not declared in this scope
11 | int n = strlen(buf);
| ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <algorithm>
+++ |+#include <cstring>
... |
s028392875 | p04032 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string str;
cin>>str;
for(int i = 0 ; i<n ; i++){
int j = i + 1;
int k = i + 2;
if(j < n && str[i] == str[j]){
cout<<i<<" "<<j;
return 0;
}
j = k;
if(j < n && str[i] == str[j]){
cout<<i<<" "<<j;
return 0;
}
cout<<-1<<" "<<-1;
}
}
... | a.cc: In function 'int main()':
a.cc:9:19: error: 'n' was not declared in this scope
9 | for(int i = 0 ; i<n ; i++){
| ^
|
s905596387 | p04032 | C++ | #include <iostream>
using namespace std;
char s[100000];
int main() {
cin >> s;
for (int i = 2; i < strlen(s);i++) {
//cout << "i:" << i << endl;
for (int j = 0; j < strlen(s)-i; j++) {
//cout << "j:" << j << endl;
int c[('z' - 'a')];
memset(c, 0, 'z' - 'a');
for (int k = 0; k <= i; k++) {
c[s[... | a.cc: In function 'int main()':
a.cc:9:29: error: 'strlen' was not declared in this scope
9 | for (int i = 2; i < strlen(s);i++) {
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <i... |
s926502269 | p04032 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <stdlib.h>
#include <math.h>
#include <map>
#define ll long long
using namespace std;
int main(){
string s;
cin >> s;
map<string, int> hash;
for ( i = 0; i < s.length() -2; ++i)
{
if(s[i] == s[i+1]){
cout << i+1 << " " << i+2 << endl;
... | a.cc: In function 'int main()':
a.cc:16:15: error: 'i' was not declared in this scope
16 | for ( i = 0; i < s.length() -2; ++i)
| ^
a.cc:33:45: error: expected ';' before 's'
33 | cout << s.length() -1 << " " s.length() << endl;
| ... |
s554785593 | p04032 | C++ | a | a.cc:1:1: error: 'a' does not name a type
1 | a
| ^
|
s096717314 | p04032 | C++ | #include<stdio.h>
2.#include<string.h>
3.int main(){
4.int a;
5.char b[100005];
6.for(int i=0;i<100005;i++){
7.b[i]=0;
8.}
9.scanf("%s",b);
10.a=strlen(b);
11.for(int i=0;i<a-2;i++){
12.if(b[i]==b[i+1]){
13.printf("%d %d",i+1,i+2);
14.return 0;
15.}
16.if(b[i]==b[i+2]){
17.printf("%d %d",i+1,i+3);
18.return 0;
19.}
20.... | a.cc:2:3: error: stray '#' in program
2 | 2.#include<string.h>
| ^
a.cc:2:1: error: expected unqualified-id before numeric constant
2 | 2.#include<string.h>
| ^~
|
s419284883 | p04032 | Java | import java.util.Scanner;
public class Hacking {
static public String solve(String str){
for(int i = 0; i < str.length(); i++){
if(i > 0){
if(str.charAt(i) == str.charAt(i-1))
return (i) +" " + (i+1);
}
if(i > 1){
if(str.charAt(i) == str.charAt(i-2)){
return (i-1) + " " + (i+1);
... | Main.java:3: error: class Hacking is public, should be declared in a file named Hacking.java
public class Hacking {
^
1 error
|
s580925451 | p04032 | Java | import java.util.Scanner;
public class Main1 {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String str = s.next();
Sub sub = new Sub();
sub.test(str.length(), str, 'a');
sub.test(str.length(), str, 'b');
sub.test(str.length(), str, 'c');
sub.test(str.length(), str, 'd... | Main.java:3: error: class Main1 is public, should be declared in a file named Main1.java
public class Main1 {
^
1 error
|
s682384601 | p04032 | Java | import java.util.Scanner;
public class Main1 {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String str = s.next();
Sub sub = new Sub();
sub.test(str.length(), str, 'a');
sub.test(str.length(), str, 'b');
sub.test(str.length(), str, 'c');
sub.test(str.length(), str, 'd... | Main.java:3: error: class Main1 is public, should be declared in a file named Main1.java
public class Main1 {
^
1 error
|
s989110486 | p04032 | C++ | #include <bits/stdc++.h>
typedef long long ll;
const int INF = 1e9;
using namespace std;
string s;
void solve(){
if(s.size==2){
if(s[0]==s[1])printf("1 2\n");
return;
}
for(int i=0;i<s.size()-2;i++){
if(s[i]==s[i+1]||s[i]==s[i+2]){
printf("%d %d\n",i+1,i+3);
... | a.cc: In function 'void solve()':
a.cc:8:10: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsi... |
s955932156 | p04032 | C++ | #include <bits/stdc++.h>
typedef long long ll;
const int INF = 1e9;
using namespace std;
string s;
void solve(){
for(int i=0;i<s.size()-2;i++){
if(s[i]==s[i+1]||s[i]==s[i+2]]){
printf("%d %d\n",i+1,i+3);
return;
}
}
printf("-1 -1\n");
}
int main() {
cin >> s;
... | a.cc: In function 'void solve()':
a.cc:9:38: error: expected ')' before ']' token
9 | if(s[i]==s[i+1]||s[i]==s[i+2]]){
| ~ ^
| )
a.cc:9:38: error: expected primary-expression before ']' token
|
s142174210 | p04032 | C++ | #include <bits/stdc++.h>
typedef long long ll;
const int INF = 1e9;
using namespace std;
string s;
void solve(){
for(int i=0;i<s.size()-2;i++){
if(s[i]==s[i+1||s[i]==s[i+2]]){
printf("%d %d\n"i+1,i+3);
return;
}
}
printf("-1 -1\n");
}
int main() {
cin >> s;
... | a.cc: In function 'void solve()':
a.cc:10:20: error: unable to find string literal operator 'operator""i' with 'const char [7]', 'long unsigned int' arguments
10 | printf("%d %d\n"i+1,i+3);
| ^~~~~~~~~~
|
s866339672 | p04032 | C++ | #include <bits/stdc++.h>
typedef long long ll;
const int INF = 1e9;
using namespace std;
string s;
void solve(){
for(int i=0;i<s.size()-2;i++){
if(s[i]==s[i+1||s[i]==s[i+2]]{
printf("%d %d\n"i+1,i+3);
return;
}
}
printf("-1 -1\n");
}
int main() {
cin >> s;
s... | a.cc: In function 'void solve()':
a.cc:9:38: error: expected ')' before '{' token
9 | if(s[i]==s[i+1||s[i]==s[i+2]]{
| ~ ^
| )
a.cc:13:5: error: expected primary-expression before '}' token
13 | }
| ^
|
s813839991 | p04032 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main() {
string a;
vector<int> b;
cin >> a;
for(int i = 2; i < a.length(); i++) {
if(a[i - 2] == a[i - 1] || a[i - 2] == a[i] || a[i - 1] == a[i]) {
cout << i - 1 << " " << i + 1 << endl;
return;
}
}
cout << -1 << " " << -1 ... | a.cc: In function 'int main()':
a.cc:12:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
12 | return;
| ^~~~~~
|
s351873609 | p04032 | C++ | #include <iostream>
using namespace std;
int main() {
string s
cin >> s;
if (s.length() > 2) {
for (int i; i < s.length()-2; i++) {
if (s[i] == s[i+1] || s[i] == s[i+2] || s[i+1] == s[i+2]) {
cout << i+1 << " " << i+3 << endl;
return 0;
}
}
} else {
cout << "-1 -1" << en... | a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
6 | cin >> s;
| ^~~
a.cc:7:7: error: 's' was not declared in this scope
7 | if (s.length() > 2) {
| ^
|
s893830415 | p04032 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>
#include <fstream>
using namespace std;
#def... | a.cc: In function 'int main()':
a.cc:48:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
48 | return;
| ^~~~~~
|
s960347557 | p04032 | C++ | #include <stdio.h>
#include <bitset>
#include <string.h>
#include <stack>
#include <algorithm>
#include <iostream>
#include <set>
#include <map>
#include <math.h>
#include <queue>
#include <complex>
#include <functional>
using namespace std ;
typedef long long ll ;
typedef long double ld ;
typedef unsigned long long ul... | a.cc: In function 'int main()':
a.cc:44:9: error: 'n' was not declared in this scope; did you mean 'yn'?
44 | n = strlen (s+1)+1;
| ^
| yn
|
s222998526 | p04032 | Java | /* Filename: ARC059D.java
* Author: Mushiyo
*/
import java.util.Scanner;
import java.util.Arrays;
public class ARC059D {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
while (input.hasNext()) {
String s = input.next();
int[] countChar = new int[26];
int[] countPrevF... | Main.java:8: error: class ARC059D is public, should be declared in a file named ARC059D.java
public class ARC059D {
^
1 error
|
s679870151 | p04032 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(){
int ans1=-1,ans2=-1;
string s;
cin >> s;
for(int i = 0; i < s.size()-2; i++){
if(s[i]==s[i+1]){
ans1=i+1;ans2=i+3;
break;
}
else if(s[i]==s[i+2]){
ans1=i+1;ans2=i+3;
break;
}
}
... | a.cc: In function 'int main()':
a.cc:23:7: error: 'ans' was not declared in this scope; did you mean 'ans2'?
23 | ans=1;ans=2;
| ^~~
| ans2
|
s485630381 | p04032 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int ans;
string s;
cin>>s;
for(int i=0;i<s.size();i++){
ans=s.find(s[i],i+1);
if(ans!=0)break;
}
cout<<i<<" "<<ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:15:7: error: 'i' was not declared in this scope
15 | cout<<i<<" "<<ans<<endl;
| ^
|
s692234921 | p04032 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int ans;
string s;
cin>>s;
for(int i=0;i<s.size();i++){
ans=s.find((string)s[i],i+1);
if(ans!=0)break;
}
cout<<i<<" "<<ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:23: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
11 | ans=s.find((string)s[i],i+1);
| ^
In file included from /usr/include/c++/14/string:... |
s267370425 | p04032 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int ans;
string s;
cin>>s;
for(int i=0;i<s.size();i++){
ans=s.find(s[i],i+1);
if(ans!=0)break;
}
cout<<i<<ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:15:7: error: 'i' was not declared in this scope
15 | cout<<i<<ans<<endl;
| ^
|
s546545985 | p04032 | C | #include<iostream>
#include<string.h>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;
typedef pai... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s782119195 | p04032 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <set>
#include <sstream>
#include <cctype>
#include <stack>
#include <queue>
#include <cstring>
#include <map>
#include <list>
#in... | a.cc: In function 'int main()':
a.cc:30:17: error: expected ';' before ':' token
30 | s+=" ":
| ^
| ;
a.cc:32:21: error: 'i' was not declared in this scope
32 | for(int i=0;i<n;i++){
| ^
|
s135980481 | p04032 | C++ | s = list(raw_input())
unbalanced = False
for c in set(s):
if s.count(c) >= len(s) / 2 + len(s) % 2:
print s.index(c) + 1, len(s) - s[::-1].index(c)
unbalanced = True
if not unbalanced:
print "-1 -1" | a.cc:1:1: error: 's' does not name a type
1 | s = list(raw_input())
| ^
|
s811832931 | p04032 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <fstream>
#include <bitset>
#include <cstdio>
#include <sstream>
#include <string>
#include <queue>
#include <map>
#include <stack>
#include <set>
#include <cctype>
#include <iomanip>
#include <list>
#include <cstring>
#define INF 200... | a.cc: In function 'int build(int, int, int)':
a.cc:51:22: error: reference to 'array' is ambiguous
51 | tree[node] = array[l];
| ^~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51,
from /usr/i... |
s849111368 | p04033 | C++ | import java.io.*;
import java.nio.Buffer;
import java.util.*;
import static java.lang.Integer.min;
public class Main {
static InputReader in = new InputReader(System.in);
static PrintWriter out = new PrintWriter(System.out);
static int sgn(int x) {
return Integer.compare(x, 0... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.nio.Buffer;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3... |
s938187346 | p04033 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (a <= 0 and 0 <= b) {
cout << "Zero" << endl;
}
else if (b < 0 and (B-A+1)%2 == 1) {
cout << "Negative" << endl;
}
else {
cout << "Positive" << endl;
}
} | a.cc: In function 'int main()':
a.cc:10:23: error: 'B' was not declared in this scope
10 | else if (b < 0 and (B-A+1)%2 == 1) {
| ^
a.cc:10:25: error: 'A' was not declared in this scope
10 | else if (b < 0 and (B-A+1)%2 == 1) {
| ^
|
s770413697 | p04033 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin >> a >> b;
if(a<0 && b<0 && ((abs(a-b)+1)%2 == 1){
cout << "Negative" << endl;
return 0;
}
else if(a<0 && b<0){
cout << "Positive" << endl;
return 0;
}
else if(a>0 && b>0 && ((abs(a-b)+1)%2 == 1){
cout << "negative"... | a.cc: In function 'int main()':
a.cc:7:41: error: expected ')' before '{' token
7 | if(a<0 && b<0 && ((abs(a-b)+1)%2 == 1){
| ~ ^
| )
|
s526349050 | p04033 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int, int> ii;
typedef map<int, int> MPII;
typedef set<int> ... | a.cc:20:29: warning: overflow in conversion from 'double' to 'int' changes value from '1.000000001e+18' to '2147483647' [-Woverflow]
20 | const int inf = 1e18 + iinf + 10;
| ~~~~~~~~~~~~^~~~
a.cc: In function 'int main()':
a.cc:40:25: error: 'b' was not declared in this scope
40 | if (n < ... |
s335091003 | p04033 | C++ | #include<bits/stdc++.h>
using namespace std;
void main()
{
long long a,b,i;
long long mul=1;
cin>>a >>b;
for(i=a;i<=b;i++)
{
mul=mul*i;
}
if(mul>0)
{
cout<<"Positive";
}
else if(mul<0)
{
cout<<"Negative";
}
else
{
cout<<"Zero";
}
return 0;
} | a.cc:3:1: error: '::main' must return 'int'
3 | void main()
| ^~~~
|
s179762876 | p04033 | C++ | #include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstd... | a.cc: In function 'int main()':
a.cc:51:25: error: expected '}' at end of input
51 | cout << ans << endl;
| ^
a.cc:30:11: note: to match this '{'
30 | int main(){
| ^
|
s675186026 | p04033 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
signed main() {
int a, b;
cin >> a >> b;
if(a > 0&& b > 0){
cout << "positive" << endl;
return 0;
else if(a * (-1) == b) {
cout << "zero" << endl;
return 0;
else cout << "negative" << e... | a.cc: In function 'int main()':
a.cc:12:9: error: expected '}' before 'else'
12 | else if(a * (-1) == b) {
| ^~~~
a.cc:9:26: note: to match this '{'
9 | if(a > 0&& b > 0){
| ^
a.cc:15:9: error: expected '}' before 'else'
15 | else cout << "n... |
s739641948 | p04033 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long a=sc.nextLong(),b=sc.nextLong(),f=1;
for(int i=a;i<=b;i++){
f*=i;
}
if(f>0){
System.out.println("Positive");
}else if(f==0){
System.out.println("Zero");
... | Main.java:6: error: incompatible types: possible lossy conversion from long to int
for(int i=a;i<=b;i++){
^
1 error
|
s558305638 | p04033 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
int main() {
int a,b; cin>>a>>b;
if(a <= 0 && b >= 0) cout << "Zero" << endl;
if else(b >= 1) cout << "Positive" << endl;
if else(-a%2==0) cout << "Positive" << endl;
el... | a.cc: In function 'int main()':
a.cc:10:6: error: expected '(' before 'else'
10 | if else(b >= 1) cout << "Positive" << endl;
| ^~~~
| (
a.cc:11:6: error: expected '(' before 'else'
11 | if else(-a%2==0) cout << "Positive" << endl;
| ^~~~
| (
a.cc:12:3: error: 'else... |
s059317972 | p04033 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int ctoi(const char c) {
if ('0' <= c && c <= '9') return (c - '0');
return -1;
}
vector<int> input(int n) {
vector<int> vec(n);
for (int i = 0; i < n; i++) {
cin >> vec.at(i);
}
return vec... | a.cc: In function 'bool reachable(std::vector<std::__cxx11::basic_string<char> >&, std::vector<std::vector<bool> >&, int, int)':
a.cc:134:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
134 | if (board.at(y).at(x)=="goal"){
| ~~~~~~~~~~~~~~~~~^~~~~~~~
|
s455786800 | p04033 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long a = sc.nextLong();
long b = sc.nextLong();
long total = 1;
if(a<0 && b>0) {
System.out.println("Zero");
} else {
for(int i=a; i<b+1; i++) {
total... | Main.java:13: error: incompatible types: possible lossy conversion from long to int
for(int i=a; i<b+1; i++) {
^
1 error
|
s916758910 | p04033 | C++ | #include<bits/std++.h>
using namespace std;
int main(){
int A,B; cin>>A>>B;
if(A<=0&&0<=B) cout<<"Zero"<<endl;
else if(B<0&&(A+B)%2==0) cout<<"Negative"<<endl;
else cout<<"Positive"<<endl;
} | a.cc:1:9: fatal error: bits/std++.h: No such file or directory
1 | #include<bits/std++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s718127656 | p04033 | C++ | // This code is generated by [cargo-atcoder](https://github.com/tanakh/cargo-atcoder)
// Original source code:
/*
use proconio::input;
#[allow(unused_imports)]
use proconio::marker::*;
#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::*;
#[allow(unused_imports)]
use std::f64::cons... | a.cc:50:14: error: too many decimal points in number
50 | for i in 0..64 { tbl[TBL[i] as usize] = i as u8; }
| ^~~~~
a.cc:63:13: warning: missing terminating ' character
63 | const TBL: &'static [u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
| ... |
s443196207 | p04033 | C++ | use std::str::FromStr;
use std::fmt::Debug;
use std::cmp;
#[allow(dead_code)]
fn read_as_vec<T>() -> Vec<T>
where T: FromStr, <T as FromStr>::Err : Debug{
let mut s = String::new();
std::io::stdin().read_line(&mut s).unwrap();
s.trim().split_whitespace().map(|c| T::from_str(c).unwrap()).collect()
}
#[allo... | a.cc:4:2: error: invalid preprocessing directive #[
4 | #[allow(dead_code)]
| ^
a.cc:13:2: error: invalid preprocessing directive #[
13 | #[allow(dead_code)]
| ^
a.cc:1:1: error: 'use' does not name a type
1 | use std::str::FromStr;
| ^~~
a.cc:2:1: error: 'use' does not name a type
2 ... |
s606404949 | p04033 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
if (a>0)
{
cout<<"Positive";
return 0;
}
if (a<=0&&b>=0)
{
cout<<"Zero";
return 0;
}
if (b<0)
{
if ((b-a)%2==0) cout<<"Negative;
else cout<<"Positive;
... | a.cc:19:31: warning: missing terminating " character
19 | if ((b-a)%2==0) cout<<"Negative;
| ^
a.cc:19:31: error: missing terminating " character
19 | if ((b-a)%2==0) cout<<"Negative;
| ^~~~~~~~~~
a.cc:20:20: warning: missing ... |
s380243847 | p04033 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<csgring>
using namespace std;
int main()
{
int a,b,s=1;
cin>>a>>b;
for(int i=a;i<=b;i++)
{
if(i<0)s*=-1;
if(i==0){
cout<<"Zero"<<endl;
return 0;
}
}
if(s>0)cout<<"Positive"<<endl;
if(s<0)cout<<"Negativ... | a.cc:4:9: fatal error: csgring: No such file or directory
4 | #include<csgring>
| ^~~~~~~~~
compilation terminated.
|
s336686740 | p04033 | Java | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
long a = Long.parseLong(sc.next());
long b = Long.parseLong(sc.next());
String ans = "Positi... | Main.java:21: error: reached end of file while parsing
}
^
1 error
|
s468896935 | p04033 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
long long a, b;
cin >> a >> b;
if (a <= 0 and b >= 0) {
cout << "Zero" << endl;
return 0;
}
if (a > 0) cout << "Positive" << endl;
if (a <= 0 and b >=0) {
l... | a.cc: In function 'int main()':
a.cc:18:9: error: expected ',' or ';' before 'if'
18 | if (c % 2 == 0) cout << "Positive" << endl;
| ^~
a.cc:19:9: error: expected '}' before 'else'
19 | else cout << "Negative" << endl;
| ^~~~
a.cc:16:27: note: to match this '{'
16 | ... |
s109292348 | p04033 | C++ | #include <iostream>
using namespace std;
int main(){
long long a, b, tmp;
tmp = 1;
cin >> a >> b;
if(a*b<=0){
cout << "Zero" << endl;
return 0;
}else(a>0){
cout << "Positive" << endl;
}
tmp = b-a+1;
if(tmp%2==0){
cout << "Positive" << endl;
}else{
cout << "Negative" << endl;
}... | a.cc: In function 'int main()':
a.cc:12:13: error: expected ';' before '{' token
12 | }else(a>0){
| ^
| ;
|
s319638715 | p04033 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
using namespace std;
int main {
long int a, b, tmp;
cin >> a >> b;
for(long int=a; a<=b; a++){
tmp *= a;
}
if(tmp>0){
cout << "Positive" << endl;
}else if(tmp<0){
cout << "Negative" << endl;
}else{
cout << "Z... | a.cc:8:5: error: cannot declare '::main' to be a global variable
8 | int main {
| ^~~~
a.cc:9:3: error: expected primary-expression before 'long'
9 | long int a, b, tmp;
| ^~~~
a.cc:9:3: error: expected '}' before 'long'
a.cc:8:10: note: to match this '{'
8 | int main {
| ... |
s820832468 | p04033 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
ll a,b;
cin >> a >> b;
if(a*b<=0)
{
cout<<"Zero"<<endl;
return 0;
}
if(a<b)swap(a,b);
if(a>0&&b>0)
{
cout<<"Positive"<<endl;
return 0;
}
int k = min(b,-1)-min(a,-1);
if(k&1)
{
cout<<"Positive"<<endl;
}
else
{
co... | a.cc: In function 'int main()':
a.cc:20:20: error: no matching function for call to 'min(ll&, int)'
20 | int k = min(b,-1)-min(a,-1);
| ~~~^~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s506708042 | p04033 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef pair<ll, ll> P;
#define rep(i, n) for(ll i = 0; i < n; i++)
#define REP(i, a, b) for(ll i = a; i <= b; i++)
#define out(x) std::cout << x << '\n'
#define all(a) a.begin(), a.end()
#define ... | a.cc:50:9: error: expected unqualified-id before 'return'
50 | return 0;
| ^~~~~~
a.cc:51:1: error: expected declaration before '}' token
51 | }
| ^
|
s590641967 | p04033 | C++ | #include <bits/stdc++.h>
using namespace std;
const int MN = 20123, INF = 1012345; MOD = 1000 * 1000 * 1000 + 7;
int inv[INF], fict[INF], invf[INF], dp[MN][MN];
void fact() {
fict[0] = inv[0] = invf[0] = 1;
fict[1] = inv[1] = invf[1] = 1;
for (int i = 2; i < INF; i++) {
inv[i] = 1ll * inv[MOD % i] * (MOD - MOD /... | a.cc:4:38: error: 'MOD' does not name a type
4 | const int MN = 20123, INF = 1012345; MOD = 1000 * 1000 * 1000 + 7;
| ^~~
a.cc: In function 'void fact()':
a.cc:11:36: error: 'MOD' was not declared in this scope
11 | inv[i] = 1ll * inv[MOD % i] * (MOD - M... |
s367436328 | p04033 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<iomanip>
#include<algorithm>
#include<queue>
#include<stack>
#include<list>
#include<map>
#include<deque>
#include<cctype>
#include<math.h>
using namespace std;
#define ll long long
int main(){
ll a b;
cin >> a >> b;
if(a<=0&&b>=0)cout <<"Zero";
... | a.cc: In function 'int main()':
a.cc:16:10: error: expected initializer before 'b'
16 | ll a b;
| ^
a.cc:17:12: error: 'a' was not declared in this scope
17 | cin >> a >> b;
| ^
a.cc:17:17: error: 'b' was not declared in this scope
17 | cin >> a >> b;
| ... |
s027343538 | p04033 | C++ | #include <bits/stdc++.h>
#include<vector>
using namespace std;
#define rep(i, n) for(int i=0; i<(int)(n); ++i)
int main() {
int a,b
cin>>a>>b;
if(a==0)cout<<"Zero";
else if(a<0&&b>=0)cout<<"Zero";
else if(a>0)cout<<"Positive";
else cout<<"Negative";
}
| a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'cin'
7 | cin>>a>>b;
| ^~~
a.cc:9:16: error: 'b' was not declared in this scope
9 | else if(a<0&&b>=0)cout<<"Zero";
| ^
|
s059711063 | p04033 | C++ | #include <bits/stdc++.h>
#include<vector>
using namespace std;
#define rep(i, n) for(int i=0; i<(int)(n); ++i)
int main() {
int a,b
cin>>a>>b;
if(a<0&&b>=0)cout<<"Zero";
else if(a>0)cout<<"Positive";
else cout<<"Negative";
}
| a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'cin'
7 | cin>>a>>b;
| ^~~
a.cc:8:11: error: 'b' was not declared in this scope
8 | if(a<0&&b>=0)cout<<"Zero";
| ^
|
s718108247 | p04033 | C++ | #include<bits/stdc++.h>
using namespace std;
int a,b;
int main(){
cin>>a>>b;
if(a>0) cout<<"Positive";
else if(a==0||(a<0&&b>0)||b==0) cout<<"Zero"
else if((abs(b)-abs(a))%2!=0) cout<<"Positive";
else cout<<"Negative";
return 0;
} | a.cc: In function 'int main()':
a.cc:7:53: error: expected ';' before 'else'
7 | else if(a==0||(a<0&&b>0)||b==0) cout<<"Zero"
| ^
| ;
8 | else if((abs(b)-abs(a))%2!=0) cout<<"Posit... |
s625038774 | p04033 | C++ | #include<bits/stdc++.h>
using namespace std;
int a,b;
int main(){
cin>>a>>b;
if(a>0) cout<<"Positive";
else if(a==0||(a<0&&b>0)||b==0) cout<<"Zero";
else if((ans(b)-abs(a))%2!=0) cout<<"Positive";
else cout<<"Negative";
return 0;
} | a.cc: In function 'int main()':
a.cc:8:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
8 | else if((ans(b)-abs(a))%2!=0) cout<<"Positive";
| ^~~
| abs
|
s085914752 | p04033 | C++ | #include<bits/stdc++.h>
using namespace std;
int a,b;
int main(){
cin>>a>>b;
if(a>0) cout<<"Positive";
else if(a==0||(a<0&&b>0)||b==0) cout<<"Zero"
else if((ans(b)-abs(a))%2!=0) cout<<"Positive";
else cout<<"Negative";
return 0;
} | a.cc: In function 'int main()':
a.cc:7:53: error: expected ';' before 'else'
7 | else if(a==0||(a<0&&b>0)||b==0) cout<<"Zero"
| ^
| ;
8 | else if((ans(b)-abs(a))%2!=0) cout<<"Posit... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.