submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s970655234 | p03862 | Java | class UnionFind {
private int[] data;
public UnionFind(int size) {
data = new int[size];
clear();
}
public UnionFind(final UnionFind uf) {
data = uf.data.clone();
}
public void copyFrom(final UnionFind uf) {
System.arraycopy(uf.data, 0, data, 0, data.length);
}
public void clear() {
Arrays.fil... | Main.java:18: error: cannot find symbol
Arrays.fill(data, -1);
^
symbol: variable Arrays
location: class UnionFind
1 error
|
s501865282 | p03862 | Java | package main
import "fmt"
type long int64
func Min(x,y long) long {
if x < y {
return x
}
return y
}
func main() {
var N,x,ans,i long
var a [100000]long
fmt.Scan(&N,&x)
for i=0;i<N;i++ {
fmt.Scan(&a[i])
}
for i=1;i<N;i++ {
var diff long = a[i-1]+a[i]-x
if diff > 0 {
ans += diff
min := Min(dif... | Main.java:1: error: ';' expected
package main
^
Main.java:3: error: <identifier> expected
import "fmt"
^
Main.java:17: error: class, interface, enum, or record expected
for i=0;i<N;i++ {
^
Main.java:17: error: class, interface, enum, or record expected
for i=0;i<N;i++ {
^
Main.... |
s259541951 | p03862 | Java | package main
import "fmt"
type long int64
func Min(x,y long) long {
if x < y {
return x
}
return y
}
func main() {
var N,x,ans,i long
var a [100000]long
fmt.Scan(&N,&x)
for i=0;i<N;i++ {
fmt.Scan(&a[i])
}
for i=1;i<N;i++ {
var diff long = a[i-1]+a[i]-x
if diff > 0 {
ans += diff
min := Min(dif... | Main.java:1: error: ';' expected
package main
^
Main.java:3: error: <identifier> expected
import "fmt"
^
Main.java:17: error: class, interface, enum, or record expected
for i=0;i<N;i++ {
^
Main.java:17: error: class, interface, enum, or record expected
for i=0;i<N;i++ {
^
Main.... |
s848593421 | p03862 | Java | package main
import "fmt"
type long int64
func Min(x,y long) long {
if x < y {
return x
}
return y
}
func main() {
var N,x,ans,i long
var a [100000]long
fmt.Scan(&N,&x)
for i=0;i<N;i++ {
fmt.Scan(&a[i])
}
for i=1;i<N;i++ {
var diff long = a[i-1]+a[i]-x
if diff > 0 {
ans += diff
min := Min(dif... | Main.java:1: error: ';' expected
package main
^
Main.java:3: error: <identifier> expected
import "fmt"
^
Main.java:17: error: class, interface, enum, or record expected
for i=0;i<N;i++ {
^
Main.java:17: error: class, interface, enum, or record expected
for i=0;i<N;i++ {
^
Main.... |
s878152459 | p03862 | C++ | #include <bits/stdc++.h>
using namespace std;
void test3(){
int n,x;
//while(cin>>n>>x){
long long ret=0;
cin>>n>>x;
vector<int> a(n);
for(int i=0;i<n;i++) cin>>a[i];
int r=x;
for(int i=0;i<n;i++){
if(a[i]>r) {
ret=ret+a[i]-r;
... | a.cc: In function 'void test3()':
a.cc:20:9: error: 'coutl' was not declared in this scope
20 | coutl<<ret<<endl;
| ^~~~~
|
s102061993 | p03862 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main() {
long long n, x, a[100005], ans = 0;
cin >> n >> x >> a[0];
for (int i = 1; i < n; ++i) {
cin >> a[i];
int d = a[i] + a[i - 1] - x;
if (d > 0) {
a[i] = max(a[i] - d, 0);
ans += d;
}
}
cout << ans << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:35: error: no matching function for call to 'max(long long int, int)'
14 | a[i] = max(a[i] - d, 0);
| ~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bi... |
s990219502 | p03862 | C++ | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
long long int N;
long long int x;
long long int candy[100000] = {0};
cin >> N >> x;
for (int i = 0; i < N; i++) {
cin >> candy[i];
}
long long int counter = 0;
for (int i = 0; i < N; i++) {
while (candy[i] + candy[i - 1... | a.cc: In function 'int main()':
a.cc:20:38: error: 'a' was not declared in this scope
20 | candy[i] = candy[i] - min(tmp, a[i]);
| ^
|
s535246410 | p03862 | C++ | #include<iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(){
unsigned long N,x,i,temp;
unsigned long array[100000];
unsigned long long sum =0;
cin >>N>>x >>array[0];
if(array[0]>x){
array[0]=x;
sum += x-array[0];
}
for(i ... | a.cc:16:13: error: extended character is not valid in an identifier
16 | for(i = 0 ; i< N; i++){
| ^
a.cc:19:13: error: extended character is not valid in an identifier
19 | for(i = 0 ; i< N-1; i++){
| ^
a.cc: In function 'int main()':
a.cc:16:13: error: unable to f... |
s091669704 | p03862 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long ans = 0;
int N = Integer.parseInt(sc.next());
int x = Integer.parseInt(sc.next());
int[] a = new int[N+1];
while(true){
a[cnt] = Integer.parseInt(sc.n... | Main.java:14: error: cannot find symbol
a[cnt] = Integer.parseInt(sc.next());
^
symbol: variable cnt
location: class Main
Main.java:15: error: cannot find symbol
cnt++;
^
symbol: variable cnt
location: class Main
Main.java:16: error: cannot find symbol
if(cnt==N)bre... |
s207041290 | p03862 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
//ranker
using namespace std;
#define REPS(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) REPS(i, 0, n)
#define RREP(i, n) REPS(i, 1, n + 1)
#define DEPS(i, a, n) for (int i = (a); i ... | a.cc: In function 'int main()':
a.cc:51:2: error: expected '}' at end of input
51 | }
| ^
a.cc:28:11: note: to match this '{'
28 | int main(){
| ^
|
s264348403 | p03862 | C++ | #include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
using namespace std;
typedef long long int ll;
ll n, x;
ll first, second;
ll ans;
ll a[100005];
int main()
{
cin >> n >> x;
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 1; i < n; i++) {
if (a[i] + a... | a.cc: In function 'int main()':
a.cc:23:40: error: expected ')' before ';' token
23 | a[i] -= ((a[i] + a[i-1] -x);
| ~ ^
| )
|
s845575741 | p03862 | Java | import java.util.Scanner;
/**
* @Author oreid
* @Release 04/12/2016
*/
public class MainA3 {
static long[] row;
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int x = scanner.nextInt();
int opertations = 0;
... | Main.java:7: error: class MainA3 is public, should be declared in a file named MainA3.java
public class MainA3 {
^
1 error
|
s466542810 | p03862 | Java | import java.util.Scanner;
public class Q3 {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
long value = sc.nextLong();
long sum = sc.nextLong();
long m = 0;
long eat = 0;
long[] arr = new long[(int) value];
for(int i = 0; i< arr.length; i++){
... | Main.java:3: error: class Q3 is public, should be declared in a file named Q3.java
public class Q3 {
^
1 error
|
s715532674 | p03862 | C | #include <stdio.h>
int main (void)
{
int a[100050];
int x;
int N;
int i;
int count = 0;
scanf("%d",&N);
scanf("%d",&x);
for(i=0;i<N;i++)
scanf("%d",&a[i]);
for(i=0;i<=N-1;i++){
if(a[i]+a[i+1] > x){
if(a[i]>=a[i+1]){
count = count+ a[i]... | main.c:29:12: error: expected declaration specifiers or '...' before string constant
29 | printf("\n");
| ^~~~
main.c:30:12: error: expected declaration specifiers or '...' before string constant
30 | printf("%d\n",count);
| ^~~~~~
main.c:30:19: error: unknown type name '... |
s348490244 | p03862 | C++ | /**
* @Author Mehdi Maick
* Created on 04/12/2016.
*/
import java.util.*;
import java.io.*;
import static java.lang.Math.*;
public class Main {
public static void solve(FastReader fs, PrintWriter pw) {
int n = fs.nextInt();
long x = fs.nextLong();
long[] tab = fs.nextLongArray(n);
... | a.cc:6:1: error: 'import' does not name a type
6 | import java.util.*;
| ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
7 | import java.io.*;
| ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:9:1: ... |
s295799974 | p03862 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int x=sc.nextInt();
int a[]=new int[n];
for (int i = 0; i < n; i++) {
a[i]=sc.nextInt();
}
long ans=0;
if(a[0]>x){
ans+=a[0]-x;
a[0]-=ans;
}
for ... | Main.java:28: error: reached end of file while parsing
}
^
1 error
|
s074114951 | p03862 | C++ | 5 9
3 1 4 1 5
| a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 5 9
| ^
|
s773541602 | p03862 | Java |
/**
* Created by sonetsuyoshi on 2016/07/31.
*/
public class Main {
static public void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
long x = scanner.nextLong();
long[] arr = new long[N];
for(int i = 0; i < N; i++) {
... | Main.java:8: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:8: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 ... |
s269360211 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
#define rep(i,n) for(int i=0; i<(n); i++)
int main(){
string S; cin>>S;
int N=S.size();
string ans;
if(S.front()==S.back()){
ans = (x%2==1) ? "Second" : "First";
}
else{
ans = (N%2==1) ? "First" : "Second";
... | a.cc: In function 'int main()':
a.cc:14:10: error: 'x' was not declared in this scope
14 | ans = (x%2==1) ? "Second" : "First";
| ^
|
s630250188 | p03863 | C++ | ada#include<bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define fi first
#define se second
#define sz size()
#define bgn begin()
#define en end()
#define pb pus... | a.cc:1:4: error: stray '#' in program
1 | ada#include<bits/stdc++.h>
| ^
a.cc:1:1: error: 'ada' does not name a type
1 | ada#include<bits/stdc++.h>
| ^~~
a.cc:15:11: error: 'vector' was not declared in this scope
15 | #define V vector
| ^~~~~~
a.cc:29:9: note: in expansion of m... |
s595927425 | p03863 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
cin >> s;
if (s[0] = s[s.length()-1]){
cout << "Second" << end;
}
else{
cout << "First" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:26: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
10 | cout << "Second" << end;
| ~~~~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/iostream:41,
... |
s461439694 | p03863 | C++ | s = gets.chomp
ca = s.size()%2 == 0 and s[0] == s[-1]
cb = s.size()%2 != 0 and s[0] != s[-1]
ans = 'Second'
if ca or cb
ans = 'First'
end
puts ans
| a.cc:6:7: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
6 | ans = 'Second'
| ^~~~~~~~
a.cc:8:11: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
8 | ans = 'First'
| ^~~~~~~
a.cc:1:1: error: 's' does not name a ty... |
s562507641 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string a;
getline(std::cin,a);
bool f1=a.size()%2==1;
bool f2=a[0]==a[a.size()-1];
std::cout<<f1^f2?"First":"Second";
return 0;
} | a.cc: In function 'int main()':
a.cc:9:16: error: no match for 'operator^' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'bool')
9 | std::cout<<f1^f2?"First":"Second";
| ~~~~~~~~~~~~~^~~
| | |
| | bool
| ... |
s646293607 | p03863 | C++ | #include <bits/stdc++.h>
using namespace std;
signed main () {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string s;
cin >> s;
if (bool(s & 1) ^ (s.front() == s.back()))
cout << "Second\n";
else
cout << "First\n";
}
| a.cc: In function 'int main()':
a.cc:10:20: error: no match for 'operator&' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
10 | if (bool(s & 1) ^ (s.front() == s.back()))
| ~ ^ ~
| | |
| | int
... |
s036857386 | p03863 | C++ | . | a.cc:1:1: error: expected unqualified-id before '.' token
1 | .
| ^
|
s601121854 | p03863 | C++ | #include <bits/stdc++.h>
using namespace std;
#define vit vector<int>::iterator
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define forn(i, n) for(int i = 0; i < int(n); i++)
#define fr first
#define sc second
#define skip continue
#define PI 3.14159265
typede... | a.cc: In function 'void solve()':
a.cc:48:12: error: 't' was not declared in this scope
48 | if(t % 2 == 0)
| ^
a.cc:53:12: error: 't' was not declared in this scope
53 | if(t % 2 == 0)
| ^
|
s310068857 | p03863 | C++ | #include <iostream>
#include <cstdio>
#include <set>
#include <list>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <string>
#include <sstream>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cctype>
#include <cmath>
#include <fstream>
#include <iomanip>
//#include <uno... | a.cc: In function 'int main()':
a.cc:34:9: error: redeclaration of 'int ans'
34 | int ans = 0;
| ^~~
a.cc:30:9: note: 'int ans' previously declared here
30 | int ans = -1;
| ^~~
|
s060896520 | p03863 | C++ | #include <bits/stdc++.h>
using namespace std;
void solve(std::string s) {
if(s.size()%2 == 0 or s[0] == s[s.size()-1])cout<<"Second";
else cout<<"First"
}
// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools (tips: You
// use the default template now. You can remove this line by using your custom
... | a.cc: In function 'void solve(std::string)':
a.cc:6:21: error: expected ';' before '}' token
6 | else cout<<"First"
| ^
| ;
7 | }
| ~
|
s928327586 | p03863 | C++ | #include <cstring>
#include <iostream>
#include <numeric>
#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
if(s.size()%2==0)
cout<<"First"<<endl;
else
cout<<"Second"<<endl; | a.cc: In function 'int main()':
a.cc:12:22: error: expected '}' at end of input
12 | cout<<"Second"<<endl;
| ^
a.cc:6:11: note: to match this '{'
6 | int main(){
| ^
|
s488080134 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
#define mod 10000007
#define ff first
#define ss second
#define ll long long
#define int long long
#define pii pair<ll,ll>
#define vi vector<ll>
#define mii map<ll,ll>
#define pb push_back
#define mp make_pair
#define sp(x,y) fixed<<setprecision(y)<<x
#define mk(arr,n,type) ... | a.cc:27:1: error: 'int_32' does not name a type
27 | int_32 main() {
| ^~~~~~
|
s099578647 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
#define mod 10000007
#define ff first
#define ss second
#define ll long long
#define int long long
#define pii pair<ll,ll>
#define vi vector<ll>
#define mii map<ll,ll>
#define pb push_back
#define mp make_pair
#define sp(x,y) fixed<<setprecision(y)<<x
#define mk(arr,n,type) ... | a.cc:26:10: error: 'N' was not declared in this scope
26 | char str[N];
| ^
a.cc:27:1: error: 'int_32' does not name a type
27 | int_32 main() {
| ^~~~~~
|
s327839859 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
#define mod 10000007
#define ff first
#define ss second
#define ll long long
#define int long long
#define pii pair<ll,ll>
#define vi vector<ll>
#define mii map<ll,ll>
#define pb push_back
#define mp make_pair
#define sp(x,y) fixed<<setprecision(y)<<x
#define mk(arr,n,type) ... | cc1plus: error: '::main' must return 'int'
a.cc: In function 'int main()':
a.cc:27:19: error: expected primary-expression before ')' token
27 | scanf("%s",str);
| ^
a.cc:28:23: error: expected primary-expression before ')' token
28 | int len=strlen(str);
| ... |
s839810438 | p03863 | C++ | #include<iostream>
#include<string>
#include<stdio.h>
main(){
string c;std::cin>>c;
int len=c.length();
if(c[0]==c[l-1]){
if(len%2==0) puts("First");
else puts("Second");
}
else{
if(len%2==0) puts("Second");
else puts("First");
}
return 0;
} | a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
5 | string c;std::cin>>c;
| ^~~~~~
a.cc:5:5: note: suggested alternatives:
In file included from /... |
s100910274 | p03863 | C++ | #include <iostream>
#include <cstdio>
#include <string>
using namespace std;
string s;
int len;
int main() {
cin >> s; len = s.size();
if (s[0] == s[len - 1]) {
if (len % 2) printf("Second\n");
else printf("First\n");
}
else {
if (len % 2) printf("First\n");
else printf... | a.cc: In function 'int main()':
a.cc:17:32: error: expected ';' before '}' token
17 | else printf("Second\n")
| ^
| ;
18 | }
| ~
|
s191947291 | p03863 | C++ | #include <bits/stdc++.h>
using namespace std;
bool isok (const string &s) {
int n = s.length();
bool ok = false;
for (int i = 1; i < n-1; i++) {
ok |= (s[i-1] != s[i+1]);
}
return ok;
}
bool isok2 (const string &s) {
map<char, int> mp;
int one = 0;
for (const char &c : s) mp[c]... | a.cc: In function 'bool isok2(const std::string&)':
a.cc:20:20: error: lvalue required as left operand of assignment
20 | return (mp.size() = 3 && one == 1);
| ~~~~~~~^~
|
s345171723 | p03863 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for... | a.cc: In function 'int main()':
a.cc:61:16: error: 's' was not declared in this scope
61 | rep(i,m-1)if(s[i]==s[i+1])ok=false;
| ^
|
s303437008 | p03863 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
void fun(char *);
void fun(char *s)
{
int len=strlen(s);
if(s[0]==s[len-1])
{
if(len%2==0)
{
printf("First\n");
}
else
{
printf("Second\n");
}
}
return;
else
{
... | main.c: In function 'fun':
main.c:20:5: error: 'else' without a previous 'if'
20 | else
| ^~~~
|
s199851644 | p03863 | C++ | #include<bits/stdc++.h>
string s;
int main(){
std::cin>>s;
puts(((s[0]==s[s.length()-1])^(s.length()%2))?"First":"Second");
} | a.cc:2:1: error: 'string' does not name a type; did you mean 'stdin'?
2 | string s;
| ^~~~~~
| stdin
a.cc: In function 'int main()':
a.cc:4:15: error: 's' was not declared in this scope
4 | std::cin>>s;
| ^
|
s412948423 | p03863 | C++ | #include<stdio.h>
#include<string.h>
char s[1000010];int main(){int len;scanf("%s",s);len=strlen(s);return 0&printf("%s",((s[0]==s[s.length()-1])^(s.length()%2))?"First":"Second");} | a.cc: In function 'int main()':
a.cc:3:97: error: request for member 'length' in 's', which is of non-class type 'char [1000010]'
3 | char s[1000010];int main(){int len;scanf("%s",s);len=strlen(s);return 0&printf("%s",((s[0]==s[s.length()-1])^(s.length()%2))?"First":"Second");}
| ... |
s636563904 | p03863 | C++ | #include <bits/stdc++.h>
using namespace std;
#define REP(i,a) for(int i = 0; i < (a); i++)
#define ALL(a) (a).begin(),(a).end()
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const long long LINF = 1e18;
const long long MOD = 1e9 + 7;
signed main(){
string s;
cin >> s;
int n = s.size... | a.cc:19:2: error: 'z' does not name a type
19 | }z
| ^
|
s327185147 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
int n = s.length();
if(((s[0] == s[n-1]) && (a % 2 == 1)) || ((s[0] != s[n-1]) && (a % 2 == 0)))
cout<<"Second\n";
else
cout<<"First\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:9:34: error: 'a' was not declared in this scope
9 | if(((s[0] == s[n-1]) && (a % 2 == 1)) || ((s[0] != s[n-1]) && (a % 2 == 0)))
| ^
|
s574805416 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
void fun(int i, string s, int &count)
{
if((s.length() > 2) && (s[a-1] != a[i+1]))
{
s.erase(1, 1);
count++;
fun(s.length()/2, s, count);
}
}
int main()
{
string s;
cin>>s;
int count = 0;
fun(s.length()/2, s, count);
if(count % 2 ==... | a.cc: In function 'void fun(int, std::string, int&)':
a.cc:6:35: error: 'a' was not declared in this scope
6 | if((s.length() > 2) && (s[a-1] != a[i+1]))
| ^
|
s413715893 | p03863 | C++ | #include <bits/stdc++.h>
string s;
int main(void){
std::cin>>s;
return 0&(int)printf("%s",((s[0]==s[s.size()-1])^(s.length()%2))?"First\n":"Second\n\r");
} | a.cc:2:1: error: 'string' does not name a type; did you mean 'stdin'?
2 | string s;
| ^~~~~~
| stdin
a.cc: In function 'int main()':
a.cc:4:15: error: 's' was not declared in this scope
4 | std::cin>>s;
| ^
|
s259640249 | p03863 | C++ | #include "cstdio"
#include "string"
#include "iostream"
using namespace std;
int main(){
string s;
cin>>s;
int x=s.size();
if(s[0]==s[x-1])
if(x%2==0){
printf("FIrst\n");return 0;
}
else{
printf("Second\n");return 0;
}
else{
if(x%2==0){
printf("Second\n");return 0;
}
else {
printf("... | a.cc: In function 'int main()':
a.cc:23:10: error: expected '}' at end of input
23 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s434387992 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
bool a=false,b=false;
if(s.size()%2==0){
a=true;
if(s[0]==s[s.size()-1]){
b=true;
}
if(a^b){
cout << "Second" << endl;
}
else{
cout << "First" << endl;
}
} | a.cc: In function 'int main()':
a.cc:19:2: error: expected '}' at end of input
19 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s116036969 | p03863 | C++ | #include <bits/stdc++.h>
#define SORT(x) sort((x).begin(),(x).end())
#define ALL(x) x.begin(),x.end()
#define db(x) cout<<#x<<"="<<x<<endl
#define rep(i, n) for(int i = 0; i < n; i++)
#define reps(i, m, n) for(int i = m; i < n; i++)
#define repr(i, m, n) for(int i = m; i >= n; i--)
#define INF (1e9)
#define PI (acos(-1... | a.cc: In function 'void Main()':
a.cc:27:3: error: 'ct' was not declared in this scope; did you mean 'c'?
27 | ct=0;
| ^~
| c
a.cc:29:3: error: 'ct2' was not declared in this scope
29 | ct2 =1;
| ^~~
|
s544351232 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++);
int main(){
string s; cin >> s;
if(s.length()%2 == 0){
if(s[0] == s[s.length()-1]) cout << "Second";
else cout << "First";
}
else{
if(s[0] == s[s.length()-1]) cout << "Second";
else cout... | a.cc: In function 'int main()':
a.cc:13:6: error: expected '}' at end of input
13 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s546962352 | p03863 | C++ | =#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int l = s.length();
if (s[0] == s[l - 1]) {
if (l % 2 == 0)
return cout << "First" << endl, 0;
else
return cout << "Second" << endl, 0;
}
else {
if (l % 2 == 0)
return cout << "Second" << endl, 0;
else
... | a.cc:1:2: error: stray '#' in program
1 | =#include <iostream>
| ^
a.cc:1:1: error: expected unqualified-id before '=' token
1 | =#include <iostream>
| ^
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from a.cc:... |
s400321713 | p03863 | C++ | #include <bits/stdc++.h>
using namespace std;
char s[10000001];
int main(){
gets(s);
if(s[0]==s[l-1])
if(l%2==0) cout<<"First"<<endl;
else cout<<"Second"<<endl;
else
if(l%2==0) cout<<"Second"<<endl;
else cout<<"Fir... | a.cc: In function 'int main()':
a.cc:5:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
5 | gets(s);
| ^~~~
| getw
a.cc:8:9: error: 'else' without a previous 'if'
8 | else cout<<"Second"<<endl;
| ^~~~
a.cc:9:5: error: 'else' without ... |
s644263789 | p03863 | C++ | //file_name:ABC48_D.cpp
#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(),a.end()
#define max... | a.cc: In function 'int main()':
a.cc:88:8: error: 'f' was not declared in this scope
88 | if(f%2==0){
| ^
|
s462616751 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
string a;
int b;
int main()
{
cin>>a;
b=a.size();
if(a[0]==a[l-1])
{
if(b%2==0)
{
cout<<"First"<<endl;
return 0;
}
else
{
cout<<"Second"<<endl;
return 0;
}
}
else
{
if(b%2==0){
cout<<"Second"<<endl;
return 0;
}
else
{
cout<<"First"<<endl;
return 0;
}
}
} | a.cc: In function 'int main()':
a.cc:9:12: error: 'l' was not declared in this scope
9 | if(a[0]==a[l-1])
| ^
|
s379799767 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
string s;
int main()
{
cin>>s;
if(s[0]==s[s.size-1]){
if(s.size()%2==0){
cout<<"First"<<endl;
}
else{
cout<<"Second"<<endl;
}
}
else{
if(s.size()%2!=0){
cout<<"First"<<endl;
}
else{
cout<<"Second"<<endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:22: 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 unsign... |
s766217215 | p03863 | C++ | #include<bits/stdc++.h
using namespace std;
int main()
{
string s;
cin>>s;
int l=s.length();
if(s[0]==s[l-1])
{
if(l%2==0)
{
cout<<"First"<<endl;
}
else
{
cout<<"Second"<<endl;
}
}
else
{
if(l%2==0)
{... | a.cc:1:23: error: missing terminating > character
1 | #include<bits/stdc++.h
| ^
|
s383765698 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
string s;
int main(){
cin>>s;
if(s[0]==s[s.length()-1]){
if(s.length()%2==0){
cout<<"First"<<endl;
return 0;
}
else{
cout<<"Second"<<endl;
return 0;
}
}
else{
if(s.length%... | a.cc: In function 'int main()':
a.cc:17: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... |
s424086767 | p03863 | C++ | #include<iostream>
#include<string>
using namespace std;
string s;
int a;
int main()
{
cin>>s;
l=s.length();
if(s[0]==s[a-1])
{
if(a%2==0)cout<<"First"<<endl;
else cout<<"Second"<<endl;
return 0;
}
else
{
if(a%2==0)cout<<"Second"<<endl;
else cout<<"First... | a.cc: In function 'int main()':
a.cc:9:5: error: 'l' was not declared in this scope
9 | l=s.length();
| ^
a.cc: At global scope:
a.cc:22:2: error: expected unqualified-id before numeric constant
22 | }0
| ^
|
s266445964 | p03863 | C++ | #include<iostream>
#include<string>
using namespace std;
string s;
int a;
int main()
{
cin>>s;
l=s.length();
if(s[0]==s[a-1])
{
if(l%2==0)cout<<"First"<<endl;
else cout<<"Second"<<endl;
return 0;
}
else
{
if(l%2==0)cout<<"Second"<<endl;
else cout<<"First... | a.cc: In function 'int main()':
a.cc:9:5: error: 'l' was not declared in this scope
9 | l=s.length();
| ^
|
s042473567 | p03863 | C++ | # include <bits/stdc++.h>
# define rep(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
# define reps(i, n) for(int i=1, i##_len=(n); i<=i##_len; ++i)
# define rrep(i, n) for(int i=((int)(n)-1); i>=0; --i)
# define rreps(i, n) for(int i=((int)(n)); i>0; --i)
# define ALL(x) (x).begin(), (x).end()
# define SZ(x) ((int)(x... | a.cc: In function 'int main()':
a.cc:24:26: error: 'S' was not declared in this scope
24 | lint med = (lint)S.size()/ 2;
| ^
|
s090566169 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
bool a[27][100002],m[27],mm=10000000;
int main(){
string s;
cin>>s;
for(int i=0;i<s.size();i++){
a[i][s[i]-'a']=1;
}
for(int j=0;j<26;j++){
m[j]=2;
int t=10000000;
for(int i=0;i<n;i++){
if(t[j][i]&&t<10000000){
m[j]=min(t,m[j]);
t=0;
}else{
t++... | a.cc: In function 'int main()':
a.cc:13:31: error: 'n' was not declared in this scope
13 | for(int i=0;i<n;i++){
| ^
a.cc:14:29: error: invalid types 'int[int]' for array subscript
14 | if(t[j][i]&&t<10000000){
| ... |
s106495982 | p03863 | C++ | #include <bits/stdc++.h>
typedef long long ll;
const int INF=1e9,MOD=1e9+7,ohara=1e6;
const ll LINF=1e18;
using namespace std;
#define rep(i,n) for(ll (i)=0;(i)<(int)(n);(i)++)
#define rrep(i,a,b) for(ll i=(a);i<(b);i++)
#define rrrep(i,a,b) for(ll i=(a);i>=(b);i--)
#define all(v) (v).begin(), (v).end()
#define pb(q) ... | a.cc: In function 'int main()':
a.cc:31:10: error: 'i' was not declared in this scope
31 | if(s[i]==s[Size(s)-1]){
| ^
|
s136373630 | p03863 | C++ | #include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
using namespace std;
int n,m,c[190901],ans;
char a[100011];
int main()
{
scanf("%s",a);
m=strlen(a);
if(a[0]==a[m-1])
{
if(m%2==1)printf("Second");
else printf("First");
}
else
{
if(m%2==0)printf("Second");
else printf("First");
}
}
... | a.cc:23:1: error: expected declaration before '}' token
23 | }
| ^
|
s178897754 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
char s[100001];
int main()
{
gets(s);
int len=strlen(s);
int len1=len-2,le;
for(int i=1;i<=len;i++)
{
if(s[i]==s[i+2]&&(s[i]!=s[i+1]))
{
len1--;
le=len1;
}
}
if((len1-le)%2==0)cout<<"Second";
else cout<<"First";
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(s);
| ^~~~
| getw
|
s841854672 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
char s[100001];
int main()
{
gets(s);
int len=strlen(s);
int len1=len-2,le;
for(int i=1;i<=len;i++)
{
if(s[i]==s[i+2]&&(s[i]!=s[i+1]))
{
if(len1==1)
{
cout<<"First";
return 0;
}
else
{
len1--;
le=len1;
}
}
} if((len1-le)%2==1)co... | a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(s);
| ^~~~
| getw
|
s348089512 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
if(s.size()%1.5==0) cout<<"First";
else cout<<"Second";
return 0;
} | a.cc: In function 'int main()':
a.cc:6:20: error: invalid operands of types 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'double' to binary 'operator%'
6 | if(s.size()%1.5==0) cout<<"First";
| ~~~~~~~~^~~~
| | |
| ... |
s175535572 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
char s[100001];
int main()
{
gets(s);
int len=strlen(s);
if(s[0]==s[len-1])
if(len%2==1)cout<<"Second";
else cout<<"First";
else if(len%2==1)cout<<"First";
else cout<<"Second";
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(s);
| ^~~~
| getw
|
s297515606 | p03863 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
using namespace std;
char a[100010];
int len;
int main()
{
cin>>s;
len=strlen(s);len--;
int m=0;
while(1)
//for(int k=1;k<=2;k++)
{
int n=m;
for(int i=1;i<len;i++)
{
if(s[i]=='.') continue;... | a.cc: In function 'int main()':
a.cc:10:10: error: 's' was not declared in this scope
10 | cin>>s;
| ^
|
s939123877 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
bool f=0;
long long z;
char s[100004];
int main(){
gets(s);
int lens=strlen(s);
for(long long i=0;i<lens;i++)
{
if(s[i]!=s[i+1])
f=1;
}
if(f==1)
{
if(s[0]!=s[lens-1])
z=lens-2;
else
z=lens-3;
}
else
z=0;
if(z%2==1)
puts("First");
else
puts("second"... | a.cc: In function 'int main()':
a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(s);
| ^~~~
| getw
|
s631423720 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
bool f=0;
long long z;
char s[100004];
int main(){
gets(s);
int lens=strlen(s);
for(long long i=0;i<lens;i++)
{
if(s[i]!=s[i+1])
f=1;
}
if(f==1)
{
if(s[0]!=s[lens=1])
z=lens-2;
else
z=lens-3;
}
else
z=0;
if(z%2==1)
puts("First");
else
puts("second"... | a.cc: In function 'int main()':
a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(s);
| ^~~~
| getw
|
s735772070 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
bool f=0;
int z;
char s[100004];
int main(){
gets(s);
int lens=strlen(s);
for(int i=0;i<lens;i++)
{
if(s[i]!=s[i+1])
f=1;
}
if(f==1)
{
if(s[0]!=s[lens=1])
z=lens-2;
else
z=lens-3;
}
else
z=0;
if(z%2==1)
puts("First");
else
puts("second");
return ... | a.cc: In function 'int main()':
a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(s);
| ^~~~
| getw
|
s241303623 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
bool f=0;
int f;
char s[100004];
int main(){
gets(s);
int lens=strlen(s);
for(int i=0;i<lens;i++)
{
if(s[i]!=s[i+1])
f=1;
}
if(f==1)
{
if(s[0]!=s[lens=1])
f=lens-2;
else
f=lens-3;
}
else
f=0;
if(f%2==1)
puts("First");
else
puts("second");
return ... | a.cc:4:5: error: conflicting declaration 'int f'
4 | int f;
| ^
a.cc:3:6: note: previous declaration as 'bool f'
3 | bool f=0;
| ^
a.cc: In function 'int main()':
a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(s);
| ^~~~
... |
s716197951 | p03863 | C++ | #include<cstdio>
#include<cstring>
using namespace std;
char s[1000005];
bool bo;
long long ji;
int main(){
scanf("%s",&s);
long long len=strlen(s);
for(long long i=0;i<len-1;i++)
{
if(s[i]!=s[i+1])bo=1;}
if(bo==1){
if(s[0]!=s[len-1])
ji=len-2;
else ji=len-3;}
else ji=0;
if(ji%2==1)cout... | a.cc: In function 'int main()':
a.cc:18:36: error: 'cout' was not declared in this scope
18 | if(ji%2==1)cout<<"First";
| ^~~~
a.cc:3:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2... |
s484461489 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
char s[100007];
int i,t;
long find(int lena)
{ int max=0;
int b=-1;
for(i=1;i<=lena/2;i++)
{
for(t=lena-2;t>i;t--)
{
if(s[i]==s[t])
{
b=t-i;
}
}
max=max>b?max:b;
}
if(b==-1)
max=1;
return max;
}
int main(){
gets(s);
int lena=strlen(s);
if(... | a.cc: In function 'int main()':
a.cc:24:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
24 | gets(s);
| ^~~~
| getw
|
s077284444 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
char s[100007];
int i,t;
long find(int lena)
{ int max=0;
int b=-1;
for(i=1;i<=lena/2;i++)
{
for(t=lena-2;t>i;t--)
{
if(s[i]==s[t])
{
b=t-i;
}
}
max=max>b?max:b;
}
if(b==... | a.cc: In function 'int main()':
a.cc:24:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
24 | gets(s);
| ^~~~
| getw
|
s224855474 | p03863 | C++ | #include<bits/stdc++.h>
using namespace std;
char s[100000000];
int main()
{
gets(s);
cout<<"First"<<endl;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | gets(s);
| ^~~~
| getw
|
s497656671 | p03863 | C++ | hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh | a.cc:1:1: error: 'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh' does not name a type
1 | hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh... |
s760581024 | p03863 | C++ | hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh | a.cc:1:1: error: 'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh' does not name a type
1 | hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
s972837081 | p03863 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
cin>>s;
cout<<(s[0]==s[s.size()-1])?"Second":"First"<<endl;
} | a.cc: In function 'int main()':
a.cc:8:47: error: invalid operands of types 'const char [6]' and '<unresolved overloaded function type>' to binary 'operator<<'
8 | cout<<(s[0]==s[s.size()-1])?"Second":"First"<<endl;
| ~~~~~~~^~~~~~
|
s597804071 | p03863 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
cin>>s;
cout<<s[0]!=s[s.size()-1]?"First":"Second"<<endl;
} | a.cc: In function 'int main()':
a.cc:8:13: error: no match for 'operator!=' (operand types are 'std::basic_ostream<char>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
8 | cout<<s[0]!=s[s.size()-1]?"First":"Second"<<endl;
a.cc:8:13: note: candidate: 'operator!=(int, int)' (... |
s418614063 | p03863 | C++ | #include <iostream>
#include <algorithm>
#include <string.h>
#include <queue>
#include <vector>
#include <set>
#include <utility>
#include <string>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <stack>
#define N 100010
using namespace std;
char str[N];
int main()
{
gets(str);
int len = strle... | a.cc: In function 'int main()':
a.cc:21:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
21 | gets(str);
| ^~~~
| getw
|
s322313702 | p03863 | C++ | #include <iostream>
#include <algorithm>
#include <string.h>
#include <queue>
#include <vector>
#include <set>
#include <utility>
#include <string>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <stack>
#define N 100010
using namespace std;
char str[N];
int main()
{
gets(str);
int len = strle... | a.cc: In function 'int main()':
a.cc:21:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
21 | gets(str);
| ^~~~
| getw
|
s446420348 | p03863 | C++ | #include <iostream>
#include <algorithm>
#include <queue>
#include <vector>
#include <set>
#include <utility>
#include <string>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <stack>
#define N 100010
using namespace std;
char str[N];
int main()
{
gets(str);
int len = strlen(str);
if (str[... | a.cc: In function 'int main()':
a.cc:20:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
20 | gets(str);
| ^~~~
| getw
|
s476260245 | p03863 | C++ | #include<stdio.h>
#include<string.h>
#include<math.h>
#define N 100010
using namespace std;
int main()
{
char x[N];
gets(x);
int m,n,sum=0;
m=strlen(x);
for(int i=1;i<m-1;i++)
{
if(x[i-1]!=x[i+1])
{
sum++;
}
}
if(sum==0)
{
printf("... | a.cc: In function 'int main()':
a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(x);
| ^~~~
| getw
|
s128520021 | p03863 | C++ | #include<stdio.h>
#include<string.h>
#include<math.h>
#define N 100010
int main()
{
char x[N];
gets(x);
int m,n,sum=0;
m=strlen(x);
for(int i=1;i<m-1;i++)
{
if(x[i-1]!=x[i+1])
{
sum++;
}
}
if(sum==0)
{
printf("Second\n");
... | a.cc: In function 'int main()':
a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
8 | gets(x);
| ^~~~
| getw
|
s381363643 | p03863 | C++ | abcab | a.cc:1:1: error: 'abcab' does not name a type
1 | abcab
| ^~~~~
|
s267334114 | p03863 | C++ | #include <iostream>
#include<cstdlib>
#include<queue>
#include<set>
#include<vector>
#include<string>
#include<algorithm>
#include<stack>
#include<map>
#include<deque>
#include<cstdio>
using namespace std;
#define rep(i,a) for(int i=0;i<a;i++)
#define mp make_pair
#define pb push_back
#define ll __int64
//#define __int... | a.cc:16:12: error: '__int64' does not name a type; did you mean '__int64_t'?
16 | #define ll __int64
| ^~~~~~~
a.cc:19:7: note: in expansion of macro 'll'
19 | const ll mod=1000000007;
| ^~
|
s882035198 | p03863 | Java | #include<iostream>
#include <math.h>
#include <bits/stdc++.h>
#define ll long long
#define inf 0x3f3f3f3f
#define maxn 310000
using namespace std;
int vis[maxn];
char s[111111];
int main()
{
int i,j,n,jj=0,sum=0,k,flag;
cin>>s;
n=strlen(s);
for(i=1;i<n-1;i++)
{
if(s[i-1]!=s[i+1]) jj++;
}... | Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:2: error: illegal character: '#'
#include <math.h>
^
Main.java:3: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:4: error: illegal character: '#'
#define ll long long
^
Main.java:5: error: illegal character: '#'
#define inf 0x... |
s016655908 | p03863 | Java | public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String s = scanner.next();
int length = s.length();
StringBuilder sb = new StringBuilder(s);
int turn = 0; // 偶数 = 高橋, 奇数 = 青木
int i = 1;
while (i < leng... | Main.java:4: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 ... |
s162503353 | p03863 | Java | import java.util.Scanner;
public class Main5 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String s = scanner.next();
int length = s.length();
StringBuilder sb = new StringBuilder(s);
int turn = 0; // 偶数 = 高橋, 奇数 = 青木
int i ... | Main.java:3: error: class Main5 is public, should be declared in a file named Main5.java
public class Main5 {
^
1 error
|
s180985929 | p03863 | C++ | #include <iostream>
#include <cstdlib>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <cstring>
using namespace std;
char s[100005];
int main() {
scanf("%s",s);
int len=strlen(s);
if ((len&1)!=(s[0]==s[len-1])) printf("First\n"); else printf("Second\n");
return 0;
}
#include <iost... | a.cc:29:6: error: redefinition of 'char s [100005]'
29 | char s[100005];
| ^
a.cc:10:6: note: 'char s [100005]' previously declared here
10 | char s[100005];
| ^
a.cc:31:5: error: redefinition of 'int main()'
31 | int main() {
| ^~~~
a.cc:12:5: note: 'int main()' previously defi... |
s634115439 | p03863 | C++ | s = input()
print('Second' if (s[0] == s[-1]) != (len(s) % 2 == 0) else 'First')
| a.cc:2:7: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
2 | print('Second' if (s[0] == s[-1]) != (len(s) % 2 == 0) else 'First')
| ^~~~~~~~
a.cc:2:61: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
2 | print('Second' if (s[0] == s[... |
s988853837 | p03863 | C++ | asdfaf | a.cc:1:1: error: 'asdfaf' does not name a type
1 | asdfaf
| ^~~~~~
|
s350919914 | p03863 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
cout << ((s.size() & 1) ^ (s[0] == s.back()) ? "First\n" : "Second\n")
} | a.cc: In function 'int main()':
a.cc:7:79: error: expected ';' before '}' token
7 | cout << ((s.size() & 1) ^ (s[0] == s.back()) ? "First\n" : "Second\n")
| ^
| ... |
s096930069 | p03863 | C++ |
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
#include <cstdio>
using namespace std;
#define rep(i, n) for (int i = 0; i<(n); i++)
int main() {
string s;
cin >> s;
s.size % 2 ^ s.begin() == s.end() ? cout << "First" << endl : cout << "Second" << endl;
} | a.cc: In function 'int main()':
a.cc:14:11: 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... |
s552459894 | p03863 | C++ | #include <cstdio>
#include <string>
#include <stack>
#include <iostream>
using namespace std;
string S;
int ans = -1, s = 0, e = -1;
int main()
{
cin>>S;
for(int i = 1 ; i < S.size() ; i++ )
if( S[i] == S[0] ) e = i;
if( e >= 0 ) ans = e-s-2;
e = S.size()-1, s = -1;
for(int i = S.size()-2 ... | a.cc: In function 'int main()':
a.cc:20:40: error: 'abc' was not declared in this scope; did you mean 'abs'?
20 | if( ans == -1 ) ans = S.size() - 2;abc
| ^~~
| abs
a.cc:22:5: error: 'else' without a previous 'if'
22 | ... |
s604562354 | p03864 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt(), x = sc.nextInt(), a[] = new int[n];
for (int i = 0; i < n; i++)
a[i] = sc.nextInt();
long cnt = 0;
cnt += Math.max(0... | Main.java:12: error: incompatible types: possible lossy conversion from long to int
int current = a[0]-cnt;
^
1 error
|
s621806635 | p03864 | Java | import java.util.Scanner;
public class VJ397313A {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt(), x = sc.nextInt(), a[] = new int[n];
for (int i = 0; i < n; i++)
a[i] = sc.nextInt();
int cnt = 0;
cnt += Math.m... | Main.java:3: error: class VJ397313A is public, should be declared in a file named VJ397313A.java
public class VJ397313A {
^
1 error
|
s019702477 | p03864 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
int main(void){
int num_box;
int limit;
int *num_C;
scanf("%d %d",&num_box,&limit);
num_C=(int *)malloc(sizeof(int)*num_box);
for(int i=0;i<num_box;i++) scanf("%d",&num_C);
int ans=0;
if(num_C[0]>limit) {
... | main.c: In function 'main':
main.c:33:5: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
33 | pritnf("%d\n",ans);
| ^~~~~~
| printf
|
s500374531 | p03864 | C++ | #include <bits/stdc++.h>
using namespace::std;
#define all(x) (x).begin(), (x).end()
#define sz(x) (int)(x).size()
typedef long long ll;
typedef array<int, 3> tri;
typedef long double ld;
template <class T> istream& operator>>(istream& I, vector<T>& v) {for (T &e: v) I >> e; return I;}
template <class T> ostream& op... | a.cc: In function 'void _main()':
a.cc:21:22: error: expected primary-expression before ';' token
21 | for (int i = ; i + 1 < n; i++) {
| ^
|
s318339599 | p03864 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mp make_pair
#define pb push_back
#define pi pair<ll,ll>
#define ff first
#define ss second
#define MAX 100005
const ll MOD = 1000000007;
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
int t=1;
//cin>>t;
while(t--){
ll n,x;
ci... | a.cc:37:2: error: stray '#' in program
37 | }#include <bits/stdc++.h>
| ^
a.cc:37:3: error: 'include' does not name a type
37 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:47:10: error: redefinition of 'const ll MOD'
47 | const ll MOD = 1000000007;
| ^~~
a.cc:11:10: note: 'const ll M... |
s099041738 | p03864 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mp make_pair
#define pb push_back
#define pi pair<ll,ll>
#define ff first
#define ss second
#define MAX 100005
const ll MOD = 1000000007;
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
int t=1;
//cin>>t;
while(t--){
ll n,x;
ci... | a.cc: In function 'int main()':
a.cc:23:14: error: 'itn' was not declared in this scope; did you mean 'int'?
23 | for(itn i=1;i<=n;i++) cin>>a[i];
| ^~~
| int
a.cc:23:22: error: 'i' was not declared in this scope
23 | for(itn i=1;i<=n;i++) cin>>a[i];
|... |
s352691202 | p03864 | C++ | // https://atcoder.jp/contests/arc064/tasks/arc064_a
#include <bits/stdc++.h>
using namespace std;
#define watch(x) cerr << (#x) << " is " << (x) << endl;
#define int long long
#define endl '\n'
signed main() {
ios::sync_with_stdio(0);
cin.sync_with_stdio(0);
cin.tie(0);
int N, x;
cin >> N >> x;... | a.cc: In function 'int main()':
a.cc:24:19: error: no matching function for call to 'max(int, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type)'
24 | ans += max(0, (a[i]+a[i-1])-x);
| ~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/alg... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.