submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s235641870 | p03741 | C++ | #include <iostream>
#include <sstream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <memory>
#include <complex>
#include <numeric>
#include <cstdio>
#include <iomanip>
#define REP(i,m,n) for(int i=int(m);i<int(n);i++)... | a.cc: In function 'int main()':
a.cc:98:26: error: lvalue required as increment operand
98 | ++cnt++;
| ~~~^~
|
s465940772 | p03741 | C++ | #include <cstdio>
#include <algorithm>
using namespace std;
long long x,y;
int main()
{
scanf("%lld%lld",&x,&y);
if (x<y)
swap(x,y);
if (x==y)
puts("Brown");
else if (x<=2)
puts("Brown");
else put("Alice");
return 0;
} | a.cc: In function 'int main()':
a.cc:14:14: error: 'put' was not declared in this scope; did you mean 'putw'?
14 | else put("Alice");
| ^~~
| putw
|
s596014923 | p03741 | C++ | #include <cstdio>
long long x,y;
int main()
{
scanf("%lld%lld",&x,&y);
if (x<y)
swap(x,y);
if (x==y)
puts("Brown");
else if (x<=2)
puts("Brown");
else put("Alice");
return 0;
} | a.cc: In function 'int main()':
a.cc:7:17: error: 'swap' was not declared in this scope
7 | swap(x,y);
| ^~~~
a.cc:12:14: error: 'put' was not declared in this scope; did you mean 'putw'?
12 | else put("Alice");
| ^~~
| putw
|
s377724173 | p03741 | C++ | /*
* 17-04-22_ARC072_C.cpp
*
* Created on: 2017/04/22
* Author: ryoma
*/
#include<iostream>
#include<algorithm>
using namespace std;
typedef unsigned long long ll;
int N;
ll a[100010];
ll ans;
ll solve(ll prev,ll sum,ll p){
ll res = p;
for(int i=1;i<N;i++){
//cout<<sum<<endl;
sum += a[i];
if(sum ... | a.cc: In function 'll solve(ll, ll, ll)':
a.cc:25:40: error: call of overloaded 'abs(ll&)' is ambiguous
25 | sum = -prev/abs(prev);
| ~~~^~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/ext/string_... |
s317532915 | p03741 | C++ | #include<bits/stdc++.h>
#define mk make_pair
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
#define int long long
int main(){
int n,s=0,sum=0,pum=0,pre;
cin>>n;
int a[n],b[n];
r(i,n)cin>>a[i];
b[0]=a[0];
for(int i=1;i<n;i++){
b[i]=a[i]+b[i-1];
if(b[i]==0){
if(b[i-1]<0)b[i]++,sum++;
... | cc1plus: error: '::main' must return 'int'
|
s349574584 | p03741 | C++ | #include<bits/stdc++.h>
#define mk make_pair
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
#define int long long
main(){
n,s=0,sum=0,pum=0,pre;
cin>>n;
int a[n],b[n];
r(i,n)cin>>a[i];
b[0]=a[0];
for(int i=1;i<n;i++){
b[i]=a[i]+b[i-1];
if(b[i]==0){
if(b[i-1]<0)b[i]++,sum++;
e... | a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
6 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:7:4: error: 'n' was not declared in this scope; did you mean 'yn'?
7 | n,s=0,sum=0,pum=0,pre;
| ^
| yn
a.cc:7:6: error: 's' was not declared in... |
s386336383 | p03741 | C++ | #include <iostream>
#include <float.h>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <iomanip>
#include <sstream>
#include <bitset>
#include <fstream>
#include <queue>
#include <math.h>
#include <set>
#include <stdlib.h>
#include <time.h>
#include <list>
#include <stack>
#include <que... | a.cc: In function 'int main()':
a.cc:96:38: error: expected '}' at end of input
96 | upper = true;
| ^
a.cc:91:22: note: to match this '{'
91 | else {
| ^
a.cc:96:38: error: expected '}' at end of input
... |
s990311577 | p03741 | C++ | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
#define all(c) (c).begin(), (c).end()
#define rep(i, n) for... | a.cc: In function 'll f(std::vector<long long int>, ll)':
a.cc:63:9: error: 'assert' was not declared in this scope
63 | assert(sum != 0);
| ^~~~~~
a.cc:11:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
10 | #include <sstream>
++... |
s902590283 | p03741 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const ll MOD = 1000000007;
ll solve(vector<ll>& a, int n){
ll ans = 0, s = a[0];
for(int i=1;i<n;i++){
ll s_next = s + a[i];
if(s < 0){
// cout << s_next << " " << a[i] << endl;
ll diff = 0;
if(s_next <= 0){
... | a.cc: In function 'int main()':
a.cc:49:12: error: redeclaration of 'll ans'
49 | ll ans = solve(a, n+1);
| ^~~
a.cc:47:12: note: 'll ans' previously declared here
47 | ll ans;
| ^~~
|
s270900976 | p03741 | C++ | #include<stdio.h>
int main(void){
long long int x,y;
scanf("%lld %lld",&x,&y);
if(abs(x-y)<=1){printf("Brown\n");}
else{printf("Alice\n");}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:12: error: 'abs' was not declared in this scope
5 | if(abs(x-y)<=1){printf("Brown\n");}
| ^~~
|
s190522050 | p03741 | C++ | #include<iostream>
#include<vector>
#include<utility>
#include<math.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<pair<int, int> > vp;
#define pb push_back
#define mod 1000000007
#define inf 999999999
#define rep(i, n) for(int i = 0; i < (n); i++)
#define... | a.cc: In function 'int main()':
a.cc:26:21: error: invalid types 'll {aka long long int}[int]' for array subscript
26 | rep(i, n) cin >> a[i];
| ^
a.cc:28:14: error: invalid types 'll {aka long long int}[int]' for array subscript
28 | int gou = a[0];
| ^
a.cc:32:13... |
s807514416 | p03741 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;
typedef long long ll;
lint main()
{
ll n; cin >> n;
vector<ll>a(n);
vector<ll>rui(n);
for (ll i = 0; i < n; i++) {
cin >> a[i];
if (i)rui[i] += rui[i - 1] + a[i];
else rui[i] = a[i];
}
vector<ll>tmp = rui;
l... | a.cc:8:1: error: 'lint' does not name a type; did you mean 'uint'?
8 | lint main()
| ^~~~
| uint
|
s693263035 | p03741 | Java | import java.util.*;
import java.io.*;
public class Sequence {
public static void main(String [] args) {
Reader in = new Reader ();
Writer out = new Writer ();
int n = in.nextInt();
int [] a = new int [n + 5];
for(int i = 1; i <= n; i++) {
a[i] = in.nextInt();
... | Main.java:4: error: class Sequence is public, should be declared in a file named Sequence.java
public class Sequence {
^
1 error
|
s277025933 | p03741 | C++ | #include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <string>
#include <algorithm>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <functional>
#include <iostream>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
int ... | a.cc:17:1: error: extended character is not valid in an identifier
17 |
| ^
a.cc:20:1: error: extended character is not valid in an identifier
20 |
| ^
a.cc:17:1: error: '\U000000a0' does not name a type
17 |
| ^
a.cc:20:1: error: '\U000000a0' does not name a type
20 |
| ... |
s299839102 | p03741 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int n, a[100010];
int main(){
while(scanf("%d", &n)!=EOF){
for(int i=0; i<n; i++){
scanf("%d", &a[i]);
//b[i] = a[i];
}
int sum=0, ans=0;
for(int i=0; i<n; i++){
sum += a[i];
if((i%2)==0){
if(sum<=0){
ans += 1-s... | a.cc: In function 'int main()':
a.cc:40:45: error: expected ';' before 'ans'
40 | if(sum<=0){a
| ^
| ;
41 | ans += 1-sum;
| ... |
s261114855 | p03741 | Java | //package ap;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import ap.one.InputReader;
//import ap.one.pair;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
InputReader scnr = new Inpu... | Main.java:8: error: package ap.one does not exist
import ap.one.InputReader;
^
1 error
|
s085016415 | p03741 | Java | //package ap;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import ap.one.InputReader;
import ap.one.pair;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
InputReader scnr = new InputR... | Main.java:8: error: package ap.one does not exist
import ap.one.InputReader;
^
Main.java:9: error: package ap.one does not exist
import ap.one.pair;
^
2 errors
|
s018920838 | p03741 | Java | //package ap;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import ap.one.InputReader;
import ap.one.pair;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
InputReader scnr = new InputR... | Main.java:8: error: package ap.one does not exist
import ap.one.InputReader;
^
Main.java:9: error: package ap.one does not exist
import ap.one.pair;
^
2 errors
|
s360555430 | p03741 | C++ | #include <fstream>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <complex>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <cstring>
#define REP(i,x) for(int i=0 ; i<(int)(x) ; i++)
#define ALL(x) (x).begin... | a.cc: In function 'int main()':
a.cc:49:5: error: 'cin' was not declared in this scope
49 | cin >> n;
| ^~~
a.cc:15:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
14 | #include <cstring>
+++ |+#include <iostream>
15 |
a.cc:53:5: ... |
s905978099 | p03741 | C | #include<stdio.h>
long a[100000];
int main(int argc, char const *argv[]){
long a,sum,bsum,ans=0,n,i,f=0,min=1;
scanf("%ld",&n);
scanf("%ld",&a[0]);
if(a[0]==0){
ans++;
sum=1;
f=1;
}else sum=a[0];
for(i=1;i<n;i++){
scanf("%ld",&a[i]);
bsum=sum;
sum+=a[i];
if(bsum>0){
if(sum>=0){
ans+=sum+1;
... | main.c: In function 'main':
main.c:7:23: error: subscripted value is neither array nor pointer nor vector
7 | scanf("%ld",&a[0]);
| ^
main.c:8:13: error: subscripted value is neither array nor pointer nor vector
8 | if(a[0]==0){
| ^
main.c:12:20: err... |
s414822168 | p03741 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(void)
{
int n;
cin >> n;
vector< int > a;
for (int i = 0; i < n; ++i) {
cin >> a[i];
}
int cnt = 0;
int sum = 0;
for (int i = 0; i < n; ++i) {
if (i == 0 && a[0] == 0) {
if (a[1] > 0) {
cnt++;
a[0] = -1... | a.cc: In function 'int main()':
a.cc:36:19: error: no matching function for call to 'abs(int, int)'
36 | cnt += abs(sum+a[i], -1);
| ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/ext/string_conversions.h:43,
... |
s382433214 | p03741 | C++ | #include <iostream>
using namespace std;
int main(void)
{
int n;
cin >> n;
vector< int > a;
for (int i = 0; i < n; ++i) {
cin >> a[i];
}
int cnt = 0;
int sum = 0;
for (int i = 0; i < n; ++i) {
if (i == 0 && a[0] == 0) {
if (a[1] > 0) {
cnt++;
a[0] = -1;
sum = -1... | a.cc: In function 'int main()':
a.cc:9:3: error: 'vector' was not declared in this scope
9 | vector< int > a;
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include <iostream>
+++ |+#include <vector>
2 | using n... |
s531855514 | p03741 | Java | import java.io.*;
import java.util.*;
public class C
{
public static void main(String[] args) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
int n = Integer.parseInt(br.read... | Main.java:4: error: class C is public, should be declared in a file named C.java
public class C
^
1 error
|
s133927401 | p03741 | C++ | use std::io;
use std::io::{Read, BufReader};
use std::cmp;
fn next_token<R: Read>(reader: &mut R) -> Vec<u8> {
let mut buf: [u8; 1] = [0];
let mut read_chars = false;
let mut ret: Vec<u8> = vec![];
loop {
if reader.read(&mut buf).unwrap() == 0 {
break;
} else {
... | a.cc:49:14: error: too many decimal points in number
49 | for _ in 0..n {
| ^~~~
a.cc:55:14: error: too many decimal points in number
55 | for i in 0..n {
| ^~~~
a.cc:72:14: error: too many decimal points in number
72 | for i in 0..n {
| ^~~~... |
s860099653 | p03742 | C++ | #include <iostream>
int main() {
long long a,b;
std::cin >> a >> b;
if(abs(a-b)<=1){
std::cout << "Brown" << endl;
}
else{
std::cout << "Alice" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
7 | std::cout << "Brown" << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41,
from... |
s242447289 | p03742 | C++ | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define Pause system("pause")
using namespace std;
typedef long long ll;... | a.cc: In function 'int main()':
a.cc:21:11: error: call of overloaded 'abs(ull)' is ambiguous
21 | if(abs(x-y)>1)
| ~~~^~~~~
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/bits/stl_algo.h:71,
from /usr/include/c++/14/algorithm:61,
... |
s074787540 | p03742 | C++ | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define Pause system("pause")
using namespace std;
typedef long long ll;... | a.cc: In function 'int main()':
a.cc:21:11: error: call of overloaded 'abs(ull)' is ambiguous
21 | if(abs(x-y)>1)
| ~~~^~~~~
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/bits/stl_algo.h:71,
from /usr/include/c++/14/algorithm:61,
... |
s975491219 | p03742 | C++ |
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define endl "\n"
#define se second
#define ls( s) (s&(-s))
#define ll long long
#define inf 0x3f3f3f3f
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const ll N = 300030;
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((... | a.cc: In function 'int main()':
a.cc:19:8: error: 'p' was not declared in this scope
19 | if(abs(p-q)>1)
| ^
a.cc:19:10: error: 'q' was not declared in this scope
19 | if(abs(p-q)>1)
| ^
|
s585277568 | p03742 | C++ | #include<iostream>
#include<cmath>
#include<algorithm>
#include<cstring>
using namespace std;
typedef long long ll;
int main () {
ll x, y;
cin >> x >> y;
if (fabs(x, y) <= 1) cout << "Brown\n";
else cout << "Alice\n";
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:13: error: no matching function for call to 'fabs(ll&, ll&)'
10 | if (fabs(x, y) <= 1) cout << "Brown\n";
| ~~~~^~~~~~
In file included from a.cc:2:
/usr/include/c++/14/cmath:250:5: note: candidate: 'template<class _Tp> constexpr typename __gnu_cxx::__enable_... |
s471814323 | p03742 | C++ | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
using VI = vector<int>;
using VL = vector<LL>;
using PII = pair<int, int>;
using PLL = pair<LL, LL>;
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(), a.end()
#define MP make_pair
#define PB push_back
#define EB emp... | a.cc: In function 'int main()':
a.cc:35:13: error: 'x' was not declared in this scope
35 | if (abs(x - y) > 1)
| ^
a.cc:35:17: error: 'y' was not declared in this scope
35 | if (abs(x - y) > 1)
| ^
|
s801165770 | p03742 | C++ | #include <cstdio>
#include <iostream>
#include <cassert>
#include <string>
#include <algorithm>
#include <cstring>
#include <utility>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cmath>
#include <deque>
#include <unordered_map>
using namespace std;
typedef long long LL;
ty... | a.cc: In function 'int main()':
a.cc:24:12: error: no matching function for call to 'abs(LL&, LL&)'
24 | if (abs(X, Y) < 2) puts("Brown");
| ~~~^~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/ext/string_conversions.h:43,
from /... |
s285666121 | p03742 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
ll X, Y;
int main(){
cin >> X >> Y;
if(abs(X - Y) <= 1){
cout << "Brown" << endl;
}else cout << "Alice" << endl;
return 0;
} | a.cc:6:1: error: 'll' does not name a type
6 | ll X, Y;
| ^~
a.cc: In function 'int main()':
a.cc:9:16: error: 'X' was not declared in this scope
9 | cin >> X >> Y;
| ^
a.cc:9:21: error: 'Y' was not declared in this scope
9 | cin >> X >> Y;
| ... |
s418731112 | p03742 | C++ |
※ ソースコードは「Main.拡張子」で保#include<bits/stdc++.h>
#define ll long long
#define rep(i, n) for(int i=0;i<(n);++i)
#define per(i, n) for(int i=(n)-1;i>=0;--i)
#define repa(i, n) for(int i=1;i<(n);++i)
#define foreach(i, n) for(auto &i:(n))
#define pii pair<int, int>
#define pll pair<long long, long long>
#define all(x) (x).be... | a.cc:2:1: error: extended character ※ is not valid in an identifier
2 | ※ ソースコードは「Main.拡張子」で保#include<bits/stdc++.h>
| ^
a.cc:2:3: error: extended character 「 is not valid in an identifier
2 | ※ ソースコードは「Main.拡張子」で保#include<bits/stdc++.h>
| ^
a.cc:2:24: error: extended character 」 is not valid in a... |
s062939493 | p03742 | C++ | #include <iostream>
using namespace std;
int main(){
long long x,y;
cin >> x >> y;
if(x<y) swap(x,y);
if((x==1&&y==0) || (x==1&&y==1) || (x==2&&y==1) || (X==0&&y==0)) cout << "Brown" << endl;
else cout << "Alice" << endl;
} | a.cc: In function 'int main()':
a.cc:7:57: error: 'X' was not declared in this scope
7 | if((x==1&&y==0) || (x==1&&y==1) || (x==2&&y==1) || (X==0&&y==0)) cout << "Brown" << endl;
| ^
|
s072208794 | p03742 | C++ |
Copy
Copy
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast", "unroll-loops")
#define ll long long
#define ull unsigned ll
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define REP(i,n) for (int i=0;i<(n);i++)
#define REP1(i,n) for (int i=1;i<=(n);i++)
#define RREP(i,n) for (int i=(n)-1; i>=0; i--)
#define pii pai... | a.cc:2:1: error: 'Copy' does not name a type
2 | Copy
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:4:
/usr/include/c++/14/... |
s987767684 | p03742 | C++ | #include <bits/stdc++.h
using namespace std:
int main () {
long long x, y;
cin >> x >> y;
if (abs (x - y) < 2)
cout << "Brown" << endl:
else
cout << "Alice" << endl;
return 0;
} | a.cc:1:24: error: missing terminating > character
1 | #include <bits/stdc++.h
| ^
a.cc:2:20: error: expected ';' before ':' token
2 | using namespace std:
| ^
| ;
a.cc:2:20: error: expected unqualified-id before ':' token
|
s509963684 | p03742 | C++ | #include<bits/stdc++.h>
typedef long long ll;
int main()
{
ll x,y;
cin>>x>>y;
if(abs(x-y)<=1)
{
cout<<"Brown"<<endl;
}
else
{
cout<<"Alice"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>x>>y;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note... |
s639592063 | p03742 | C++ | #include<bits/stdc++.h>
typedef long long ll;
int main()
{
ll x,y;
cin>>x>>y;
if(abs(x-y)<=1)
{
cout<<"Brown"<<endl;
}
else
{
cout<<"Alice"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>x>>y;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note... |
s390628549 | p03742 | C++ | #include <bits/stdc++.h>
typedef long long ll;
ll x, y;
int main()
{
scanf("%lld%lld", &x, &y);
printf("%s\n", max(0ll, x - 1) > y? "Alice" : "Brown");
return 0;
} | a.cc: In function 'int main()':
a.cc:10:24: error: 'max' was not declared in this scope; did you mean 'std::max'?
10 | printf("%s\n", max(0ll, x - 1) > y? "Alice" : "Brown");
| ^~~
| std::max
In file included from /usr/include/c++/14/algorithm:61,
... |
s241853559 | p03742 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll long long;
int main() {
ll X,Y; cin >> X >> Y;
bool alice = (llabs(X-Y) >= 2);
cout << (alice ? "Alice" : "Brown") << endl;
return 0;
} | a.cc:4:7: error: expected nested-name-specifier before 'll'
4 | using ll long long;
| ^~
a.cc: In function 'int main()':
a.cc:7:5: error: 'll' was not declared in this scope
7 | ll X,Y; cin >> X >> Y;
| ^~
a.cc:7:20: error: 'X' was not declared in this scope
7 | ll X,Y; cin >> ... |
s086057558 | p03742 | C++ | #include #include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <cstring>
#include <numeric>
#include <algorithm>
#include <functional>
#include <array>
#include <map>
#include <queue>
#include <limits.h>
#include <set>
#include <stack>
#include <random>
#include <complex>
#include <unordered... | a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
1 | #include #include <iostream>
| ^
a.cc:69:9: warning: "INF" redefined
69 | #define INF 10000000000000LL
| ^~~
a.cc:54:9: note: this is the location of the previous definition
54 | #define INF 10000000000000000LL
... |
s851658369 | p03742 | C++ | #include <iostream>
using namespace std;
int main(){
long long x,y;
cin >> x >> y;
abs(x-y)<=1? cout <<"Brown"<<endl : cout << "Alice" << endl; | a.cc: In function 'int main()':
a.cc:6:65: error: expected '}' at end of input
6 | abs(x-y)<=1? cout <<"Brown"<<endl : cout << "Alice" << endl;
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s864140619 | p03742 | C++ | int main()
{
long long X, Y;
std::cin>>X>>Y;
if (abs(X - Y) <= 1)
std::cout<<"Brown\n";
else
std::cout<<"Alice\n";
} | a.cc: In function 'int main()':
a.cc:4:10: error: 'cin' is not a member of 'std'
4 | std::cin>>X>>Y;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | int main()
a.cc:5:9: error: 'abs' w... |
s504895735 | p03742 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long long int x,y;cin>>x>>y
string ans;
if(abs(x-y)<=1)ans='Brown';
else ans='Alice';
cout<<ans<<endl;
} | a.cc:6:22: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
6 | if(abs(x-y)<=1)ans='Brown';
| ^~~~~~~
a.cc:7:12: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
7 | else ans='Alice';
| ^~~~~~~
a.cc: ... |
s074523543 | p03742 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
long long int x,y;cin>>x>>y;
if(abs(x-y)<=1)ans='Brown';
else ans='Alice';
cout<<ans<<endl;
} | a.cc:5:22: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
5 | if(abs(x-y)<=1)ans='Brown';
| ^~~~~~~
a.cc:6:12: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
6 | else ans='Alice';
| ^~~~~~~
a.cc: ... |
s417473882 | p03742 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int x,y;cin>>x>>y;
if(abs(x-y)<=1)string ans="Brown";
else string ans="Alice";
cout<<ans<<endl;
}
| a.cc: In function 'int main()':
a.cc:7:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
7 | cout<<ans<<endl;
| ^~~
| abs
|
s361659949 | p03742 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int x,y;cin>>x>>y;
if(abs(x-y)<=1)string ans='Brown';
else string ans='Alice';
cout<<ans<<endl;
}
| a.cc:5:29: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
5 | if(abs(x-y)<=1)string ans='Brown';
| ^~~~~~~
a.cc:6:19: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
6 | else string ans='Alice';
| ... |
s355215604 | p03742 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int x,y;cin>>x>>y;
if(abs(x-y)<=1)ans='Brown';
else ans='Alice';
cout<<ans<<endl;
} | a.cc:5:22: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
5 | if(abs(x-y)<=1)ans='Brown';
| ^~~~~~~
a.cc:6:12: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
6 | else ans='Alice';
| ^~~~~~~
a.cc: ... |
s045350000 | p03742 | C++ | #include <iostream>
#include <fstream>
#include <string>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <functional>
#include <cctype>
#include ... | a.cc: In function 'int main()':
a.cc:188:19: error: expected primary-expression before ')' token
188 | if (A == B || ){
| ^
|
s376445524 | p03742 | C++ | #include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<map>
#include<set>
#include<list>
#include<iomanip>
#include<vector>
#include<random>
#include<functional>
#include<algorithm>
#include<cstdio>
#include<bitset>
#include<unordered_map>
using namespace std;
//-----------------------------------... | a.cc: In function 'int main()':
a.cc:97:16: error: no matching function for call to 'abs(long long int&, long long int&)'
97 | if (abs(x, y) <= 1) cout << "Brown\n";
| ~~~^~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/ext/string_conver... |
s247074585 | p03742 | C++ | #include <iostream>
#include <climits>
#include <stack>
#include <queue>
#include <string>
#include <random>
#include <utility>
#include <cmath>
#include <string.h>
#include <iomanip>
#include <stdlib.h>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
long long i... | a.cc:38:19: error: redefinition of 'long long int a'
38 | long long int x,y,a,b;
| ^
a.cc:32:15: note: 'long long int a' previously declared here
32 | long long int a,k;
| ^
a.cc:38:21: error: redefinition of 'long long int b'
38 | long long int x,y,a,b;
| ... |
s586375148 | p03742 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <bitset>
#include <stack>
#include <set>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> P2;
const int inf=1000000000;
int dp[101][101][301]={};
ll w1[101]={};
int v1[101]={};
ll km[101]={};
int... | a.cc: In function 'int main()':
a.cc:20:12: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'll' {aka 'long long int'})
20 | cin>x>>y;
| ~~~^~~~~
| | |
| | ll {aka long long int}
| std::istrea... |
s951630222 | p03742 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define rep(i, a, n) for(int i = (a); i < (n); i++)
#define dep(i, a, n) for(int i = (a); i >= (n); i--)
__attribute__((constructor))
void initial() {
cin.tie(0);
ios::sync_with_stdio(false);
}
int main() {
ll a, b;
cin... | a.cc: In function 'int main()':
a.cc:19:22: error: no match for 'operator<=' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'int')
19 | cout << abs(a - b) <= 1 ? "Brown" : "Alice" << endl;
| ~~~~~~~~~~~~~~~~~~ ^~ ~
| | |
... |
s508301837 | p03742 | C++ | #include<bits/stdc++.h>
using namespace std;
LL x,y;
int main()
{
cin>>x>>y;
printf(abs(x-y)<=1 ? "Brown" : "Alice");
return 0;
} | a.cc:3:1: error: 'LL' does not name a type
3 | LL x,y;
| ^~
a.cc: In function 'int main()':
a.cc:6:6: error: 'x' was not declared in this scope
6 | cin>>x>>y;
| ^
a.cc:6:9: error: 'y' was not declared in this scope; did you mean 'yn'?
6 | cin>>x>>y;
| ^
| yn
|
s925949779 | p03742 | C++ | #include<iostream>
using namespace std;
int main (){
int n,m;
cin>>n>>m;
if(n>m){int k=n;n=m;m=k;}
if((m-n)>1)cout<<Alice<<endl;
else cout<<Brown<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:18: error: 'Alice' was not declared in this scope
8 | if((m-n)>1)cout<<Alice<<endl;
| ^~~~~
a.cc:9:12: error: 'Brown' was not declared in this scope
9 | else cout<<Brown<<endl;
| ^~~~~
|
s367985942 | p03742 | C++ | #include <iostream>
using namespace std;
long long x, y;
long long abs(long long x) { return x < 0 ? -x : x; }
int main(){
cin>>x>>y;
if(abs(x-y) <= 1) cout<<"Alice";
else cout<<"Brown";
} | a.cc: In function 'int main()':
a.cc:7:9: error: call of overloaded 'abs(long long int)' is ambiguous
7 | if(abs(x-y) <= 1) cout<<"Alice";
| ~~~^~~~~
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/ext/string_conversions.h:43,
from /usr/i... |
s336336423 | p03742 | C++ | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
typedef long long ll;
const ll INF = 1000000000000000000ll;
const ll MOD = 1000000007ll;
const double EPS = 1e-8;
int memo[105][105];
bool rec(int x, int y, bool a){
if(x < 2 && y < 2){
//cout << !a << endl;
return false;
}
if(memo[x... | a.cc: In function 'int main()':
a.cc:62:62: error: expected ';' before 'return'
62 | printf("%s\n", (abs(x - y) <= 1) ? "Brown" : "Alice")
| ^
| ;
......
65 | retur... |
s387822309 | p03742 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long a,b;
cin>>a>>b;
if(abs(x-y)>1)cout<<"Alice"<<endl;
else cout<<"Brown"<<endl;
} | a.cc: In function 'int main()':
a.cc:6:10: error: 'x' was not declared in this scope
6 | if(abs(x-y)>1)cout<<"Alice"<<endl;
| ^
a.cc:6:12: error: 'y' was not declared in this scope
6 | if(abs(x-y)>1)cout<<"Alice"<<endl;
| ^
|
s263286294 | p03742 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using... | a.cc: In function 'int main()':
a.cc:15:9: error: 'll' was not declared in this scope; did you mean 'all'?
15 | ll x,y;
| ^~
| all
a.cc:16:14: error: 'x' was not declared in this scope
16 | cin>>x>>y;
| ^
a.cc:16:17: error: 'y' was not declared in thi... |
s512515034 | p03742 | Java | import java.io.*;
import java.util.*;
public class A {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
System.out.println(Math.abs(sc.nextLong() - sc.nextLong()) <= 1 ? "Brown" : "Alice");
... | Main.java:4: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s977609077 | p03742 | C++ | #include<iostream>
#include<vector>
#include<cmath>
#include<utility>
using namespace std;
typedef long long LL;
#define F first
#define S second
int main() {
LL a, b;
cin >> a >> b;
if (abs(a - b) >= 2)cout << "Alice" << endl;
else cout << "Brown" << endl;
return;
} | a.cc: In function 'int main()':
a.cc:15:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
15 | return;
| ^~~~~~
|
s847446894 | p03742 | C++ | #include<iostream>
#include<vector>
#include<cmath>
#include<utility>
using namespace std;
typedef long long LL;
#define F first
#define S second
#define int LL
void main() {
LL a, b;
cin >> a >> b;
if (abs(a - b) >= 2)cout << "Alice" << endl;
else cout << "Brown" << endl;
return;
} | a.cc:11:1: error: '::main' must return 'int'
11 | void main() {
| ^~~~
a.cc: In function 'int main()':
a.cc:16:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
16 | return;
| ^~~~~~
|
s515425522 | p03742 | C++ | #include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
using namespace boost::multiprecision;
typedef pair<int,int> pii;
typedef long long ll;
typedef vector<int> vi;
#define rep(i,j) for(int i=0;i<(j);i++)
#define reps(i,j,k) for(int i=j;i<k;i++)
#define in(i,j,k) ((i)>=(j)&&(i)<=(k... | a.cc:2:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
2 | #include <boost/multiprecision/cpp_int.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s372504436 | p03742 | C++ | #include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
using namespace boost::multiprecision;
typedef pair<int,int> pii;
typedef long long ll;
typedef vector<int> vi;
#define rep(i,j) for(int i=0;i<(j);i++)
#define reps(i,j,k) for(int i=j;i<k;i++)
#define in(i,j,k) ((i)>=(j)&&(i)<=(k... | a.cc:2:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
2 | #include <boost/multiprecision/cpp_int.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s625217523 | p03742 | C++ | #include<bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
using namespace boost::multiprecision;
typedef pair<int,int> pii;
typedef long long ll;
typedef vector<int> vi;
#define rep(i,j) for(int i=0;i<(j);i++)
#define reps(i,j,k) for(int i=j;i<k;i++)
#define in(i,j,k) ((i)>=(j)&&(i)<=(k)... | a.cc:2:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
2 | #include <boost/multiprecision/cpp_int.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s019469536 | p03742 | C++ | #include<bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
using namespace boost::multiprecision;
typedef pair<int,int> pii;
typedef long long ll;
typedef vector<int> vi;
#define rep(i,j) for(int i=0;i<(j);i++)
#define reps(i,j,k) for(int i=j;i<k;i++)
#define in(i,j,k) ((i)>=(j)&&(i)<=(k)... | a.cc:2:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
2 | #include <boost/multiprecision/cpp_int.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s699318046 | p03742 | C++ | #include <iostream>
#include <cstdio>
#define A() printf("Alice\n");
#define B() printf("Brown\n");
#define int long long
#define INF 1e+18
using namespace std;
signed main(){
int n,m;
cin >> n >> m;
if(n <= 1 && m <= 1) B();
else if(n == 0 || m == 0) A();
else{
if((n + m) % 2) A();
else B();
}
return 0;
} | a.cc: In function 'int main()':
a.cc:13:9: error: 'else' without a previous 'if'
13 | else if(n == 0 || m == 0) A();
| ^~~~
a.cc:14:9: error: 'else' without a previous 'if'
14 | else{
| ^~~~
a.cc:16:17: error: 'else' without a previous 'if'
16 | else ... |
s509352155 | p03742 | C++ | #include <iostream>
#include <cstdio>
#define A() printf("Alice\n");
#define B() printf("Brown\n");
#define int long long
#define INF 1e+18
#define
using namespace std;
signed main(){
int n,m;
cin >> n >> m;
if(n <= 1 && m <= 1) B();
else if(n == 0 || m == 0) A();
else{
if((n + m) % 2) A();
else B();
}
ret... | a.cc:7:9: error: no macro name given in #define directive
7 | #define
| ^
a.cc: In function 'int main()':
a.cc:14:9: error: 'else' without a previous 'if'
14 | else if(n == 0 || m == 0) A();
| ^~~~
a.cc:15:9: error: 'else' without a previous 'if'
15 | else{
| ... |
s242438403 | p03742 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int,int> pint;
typedef vector<pint> vpint;
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,n) for(int i=n-1;i>=(0);i--)
#define reps(i,f,n) for(int i=(f);i<(n);i++)
#define each(it,v) for(__typeof((v).begin(... | a.cc: In function 'int main()':
a.cc:31:9: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
31 | dfs(X, Y, 0);
| ^~~
| ffs
a.cc:32:12: error: 'flag' was not declared in this scope
32 | if(flag){
| ^~~~
|
s430573278 | p03742 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <queue>
#include <set>
#include <numeric>
#include <cmath>
using namespace std;
typedef unsigned long long int ulld;
//const lld mod = 1e9+7;
//const lld INF = 1e9;
//const lld MAXN = 1e9;
int main()
{
ulld x,y;... | a.cc: In function 'int main()':
a.cc:44:30: error: expected ';' before '}' token
44 | sol = "Alice"
| ^
| ;
......
52 | }
| ~
|
s461346536 | p03742 | C++ | #include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>... | a.cc: In function 'int main()':
a.cc:95:8: error: 'x' was not declared in this scope; did you mean 'dx'?
95 | if(x > y) swap(x, y);
| ^
| dx
a.cc:95:12: error: 'y' was not declared in this scope; did you mean 'yn'?
95 | if(x > y) swap(x, y);
| ^
| ... |
s959738767 | p03742 | C++ | #include <cstdio>
long long X,Y;
int main()
{
scanf("%lld%lld",&X,&Y);
if (x<y)
swap(x,y);
if (x==y)
puts("Brown");
else if (x<=2)
puts("Brown");
else put("Alice");
return 0;
} | a.cc: In function 'int main()':
a.cc:6:13: error: 'x' was not declared in this scope
6 | if (x<y)
| ^
a.cc:6:15: error: 'y' was not declared in this scope
6 | if (x<y)
| ^
a.cc:7:17: error: 'swap' was not declared in this scope
7 | swap(x... |
s653591576 | p03742 | C++ | #include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#include <cstring>
class JNum{
static constexpr uint64_t mod = 1000000007;
uint64_t num;
public:
JNum(uint64_t x):num(x%mod){}
JNum operator+(const JNum& j)const{
return (num + j.num)%mod;
}
JNum operator*(const JNum& j)const{
return... | a.cc:7:26: error: 'uint64_t' does not name a type
7 | static constexpr uint64_t mod = 1000000007;
| ^~~~~~~~
a.cc:6:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
5 | #include <cstring>
+++ |+#include <cstdin... |
s859294475 | p03742 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <queue>
#include <set>
#include <numeric>
#include <cmath>
using namespace std;
typedef unsigned long long int ulld;
const lld mod = 1e9+7;
const lld INF = 1e9;
//const lld MAXN = 1e9;
int main()
{
ulld x,y;
c... | a.cc:15:7: error: 'lld' does not name a type; did you mean 'ulld'?
15 | const lld mod = 1e9+7;
| ^~~
| ulld
a.cc:16:7: error: 'lld' does not name a type; did you mean 'ulld'?
16 | const lld INF = 1e9;
| ^~~
| ulld
|
s383254216 | p03742 | C++ | #include <bits/stdc++.h>
using namespace std;
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define mp(a,b) make_pair((a),(b))
#define pb(a) push_back((a))
#define all(x) (x).begin(),(x).end()
#define uniq(x) sort(all(x)),(x).erase(unique(all(x)),end(x))
#define fi first
#define se... | a.cc: In function 'bool solve(long int, long int)':
a.cc:18:21: error: 'dp' was not declared in this scope; did you mean 'dup'?
18 | if(x+y<=1) return dp[x][y] = false;
| ^~
| dup
a.cc:19:49: error: 'dp' was not declared in this scope; did you mean 'dup'?
19 |... |
s876194409 | p03742 | Java | import java.util.*;
public class Main {
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long X = sc.nextLong();
long Y = sc.nextLong();
System.out.println(Math.abs(X-Y)<=1 ? "Brown" : "Alice");
sc.close();
}
}
| Main.java:13: error: reached end of file while parsing
}
^
1 error
|
s569578857 | p03742 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#define Rep(i,n) for(int i=#include<bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#de... | a.cc:8:16: error: '#' is not followed by a macro parameter
8 | #define Rep(i,n) for(int i=#include<bits/stdc++.h>
| ^
a.cc:20:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
20 | main()
| ^~~~
a.cc:28:1: error: expected unqualified-id before numeric const... |
s439380700 | p03742 | C++ | #include<stdio.h>
int main(void){
long long int x,y;
scanf("%lld %lld",&x,&y);
if(abs(x-y)<=1){printf("Brown\n");}
else{printf("Alice\n");}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:12: error: 'abs' was not declared in this scope
5 | if(abs(x-y)<=1){printf("Brown\n");}
| ^~~
|
s340813355 | p03742 | C++ | /*
This code has been written by MinakoKojima, feel free to ask me question. Blog: http://www.shuizilong.com/house
Template Date: 2015.10.12
Note: ...
*/
#pragma comment(linker, "/STACK:36777216")
//#pragma GCC optimize ("O2")
#define LOCAL
#include <functional>
#include <algorithm>
#include <iostream>
#include <f... | /tmp/cczpAQHu.o: in function `main':
a.cc:(.text+0x159): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/cczpAQHu.o
a.cc:(.text+0x163): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/cczpAQHu.o
a.cc:(.text+0x172): relocation tr... |
s365474999 | p03742 | C++ | #include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
#define pii pair<int,int>
#define LL long long
#define st first
#define nd second
#define endl '\n'
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
LL x,y;
cin>>x>>y;
if(x==y||abs(x-y)==1)
cout<<"Brown"<<endl;
else co... | a.cc: In function 'int main()':
a.cc:17:34: error: 'g' was not declared in this scope
17 | else cout<<"Alice"<<endl;g
| ^
|
s471743235 | p03743 | C++ | #include <stdio.h>
#include <assert.h>
#include <fstream>
#include <iostream>
#include <algorithm>
#include <array>
#include <vector>
#include <queue>
#include <set>
#include <cmath>
#include <iomanip>
#include <unordered_map>
//#include <unordered_set>
//#include <boost/container/static_vector.hpp>
//#include <boost/u... | a.cc: In function 'int main(int, char**)':
a.cc:50:26: error: no matching function for call to 'min(int, long long int&)'
50 | loc[i] = std::min(abs(loc[i-1] - d[i]), loc[i-1]);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
... |
s914723831 | p03743 | C++ | // ConsoleApplication7.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "iostream"
using namespace std;
typedef long long i64;
int n;
int D;
int Q;
i64 d[500005];
i64 a[500005];
i64 b[500005];
i64 q[500005];
bool f[500005];
int main()
{
scanf("%d%d", &n, &D);
for (int i = 0;... | a.cc:4:10: fatal error: stdafx.h: No such file or directory
4 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s081548527 | p03743 | C++ | // ConsoleApplication7.cpp : Defines the entry point for the console application.
//
#include "iostream"
using namespace std;
int n;
int D;
int Q;
long long d[500005];
long long a[500005];
long long b[500005];
long long d[500005];
long long q[500005];
bool f[500005];
int main()
{
scanf("%d%d", &n, &d);
for (int i =... | a.cc:13:11: error: redefinition of 'long long int d [500005]'
13 | long long d[500005];
| ^
a.cc:10:11: note: 'long long int d [500005]' previously declared here
10 | long long d[500005];
| ^
a.cc: In function 'int main()':
a.cc:45:29: error: ordered comparison of pointer with inte... |
s517074723 | p03743 | C++ | // ConsoleApplication7.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "iostream"
using namespace std;
int n;
int D;
int Q;
long long d[500005];
long long a[500005];
long long b[500005];
long long d[500005];
long long q[500005];
bool f[500005];
int main()
{
scanf("%d%d", &n,... | a.cc:4:10: fatal error: stdafx.h: No such file or directory
4 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s985255485 | p03743 | C | #include<stdio.h>
#define abs(a) ((a)<0)?-(a):(a)
long d[500000],q[500000],a[500001],b[500001];
int main(int argc, char const *argv[]){
long n,d,Q,i;
scanf("%ld %ld",&n,&d);
a[0]=d;
for(i=0;i<n;i++){
scanf("%ld",&d[i]);
if(abs(a[i]-d[i])<a[i]) a[i+1]=abs(a[i]-d[i]);
else a[i+1]=a[i];
}
b[n]=1;
for(i=n-1;i... | main.c: In function 'main':
main.c:10:31: error: subscripted value is neither array nor pointer nor vector
10 | scanf("%ld",&d[i]);
| ^
main.c:11:30: error: subscripted value is neither array nor pointer nor vector
11 | if(abs(a[i]-d[i])<a[i]) a[... |
s209770306 | p03743 | C | #include<stdio.h>
#define abs(a) ((a)<0)?-(a):(a)
long d[500000],q[500000],a[500001],b[500001];
int main(int argc, char const *argv[]){
long n,d,q,i;
scanf("%ld %ld",&n,&d);
a[0]=d;
for(i=0;i<n;i++){
scanf("%ld",&d[i]);
if(abs(a[i]-d[i])<a[i]) a[i+1]=abs(a[i]-d[i]);
else a[i+1]=a[i];
}
b[n]=1;
for(i=n-1;i... | main.c: In function 'main':
main.c:10:31: error: subscripted value is neither array nor pointer nor vector
10 | scanf("%ld",&d[i]);
| ^
main.c:11:30: error: subscripted value is neither array nor pointer nor vector
11 | if(abs(a[i]-d[i])<a[i]) a[... |
s246139725 | p03743 | C | #include<stdio.h>
#define abs(a) ((a)<0)?-(a):(a);
long d[500000],q[500000],a[500001],b[500001];
int main(int argc, char const *argv[]){
long n,d,q,i;
scanf("%ld %ld",&n,&d);
a[0]=d;
for(i=0;i<n;i++){
scanf("%ld",&d[i]);
if(abs(a[i]-d[i])<a[i]) a[i+1]=abs(a[i]-d[i]);
else a[i+1]=a[i];
}
b[n]=1;
for(i=n-1;... | main.c: In function 'main':
main.c:10:31: error: subscripted value is neither array nor pointer nor vector
10 | scanf("%ld",&d[i]);
| ^
main.c:11:30: error: subscripted value is neither array nor pointer nor vector
11 | if(abs(a[i]-d[i])<a[i]) a[... |
s999024835 | p03743 | C++ | #include<bits/stdc++.h>
#include<unordered_set>
#include<unordered_map>
using namespace std;
#define MAX 500002
int n;
int d;
vector<long long int> v;
int q;
vector<int> ask[MAX];
bool ans[MAX];
void outt(){
for (int i = 0; i < q; i++){
if (ans[i] == false){
puts("NO");
}
else{
puts("YES");
}
}
e... | a.cc:49:1: error: '\U000030a8\U000030e9\U000030fc' does not name a type
49 | エラー
| ^~~~~~
|
s193168206 | p03743 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long int n,D;
cin>>n>>D;
vector<long long int> d(n);
for(int i=0;i<n;i++){
cin>>d[i];
}
int q;
cin>>q;
vector<long long int> dis(n);
dis[0]=D;
for(int i=1;i<n;i++){
dis[i]=min(dis[i-1],abs(dis[i-1]-d[i-1]));
}
for(int i=0... | a.cc: In function 'int main()':
a.cc:27:12: error: no matching function for call to 'min(const long long int&, int&)'
27 | k=min(max(k-d[i],d[i]/2),k);
| ~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bi... |
s535512808 | p03743 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long int n,D;
cin>>n>>D;
vector<long long int> d(n);
for(int i=0;i<n;i++){
cin>>d[i];
}
int q;
cin>>q;
vector<long long int> dis(n);
dis[0]=D;
for(int i=1;i<n;i++){
dis[i]=min(dis[i-1],abs(dis[i-1]-d[i-1]));
}
for(int i=0... | a.cc: In function 'int main()':
a.cc:27:12: error: no matching function for call to 'min(const long long int&, int&)'
27 | k=min(max(k-d[i],d[i]/2),k);
| ~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bi... |
s416988254 | p03744 | C++ | #include<bits/stdc++.h>
using namespace std;
#define INFS (1LL<<28)
#define DEKAI 1000000007
//#define MOD 1000000007
#define lp(i,n) for(int i=0;i<n;i++)
#define lps(i,n) for(int i=1;i<=n;i++)
#define all(c) begin(c), end(c)
//#define int long long
namespace {
#define __DECLARE__(C) \
template <typename T>... | a.cc: In function 'int main()':
a.cc:267:16: error: 'long long' specified with 'double'
267 | #define double long double
| ^~~~
a.cc:320:45: note: in expansion of macro 'double'
320 | as.push_back({(long double)val/totall,totall});
| ... |
s085683019 | p03744 | C++ | #include<bits/stdc++.h>
using namespace std;
#define INFS (1LL<<28)
#define DEKAI 1000000007
//#define MOD 1000000007
#define lp(i,n) for(int i=0;i<n;i++)
#define lps(i,n) for(int i=1;i<=n;i++)
#define all(c) begin(c), end(c)
//#define int long long
namespace {
#define __DECLARE__(C) \
template <typename T>... | a.cc: In function 'int main()':
a.cc:324:39: error: no matching function for call to 'min(long double, long long int&)'
324 | double lbs=min(l-b,ls);
| ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/includ... |
s894382811 | p03744 | C++ | #include<bits/stdc++.h>
using namespace std;
#define INFS (1LL<<28)
#define DEKAI 1000000007
//#define MOD 1000000007
#define lp(i,n) for(int i=0;i<n;i++)
#define lps(i,n) for(int i=1;i<=n;i++)
#define all(c) begin(c), end(c)
//#define int long long
namespace {
#define __DECLARE__(C) \
template <typename T>... | a.cc: In function 'int main()':
a.cc:308:50: error: expected ';' before ')' token
308 | for(int i=vcnt-100;i<vcnt){
| ^
| ;
|
s980320549 | p03744 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
#define fo(i,j,k) for(i=j;i<=k;i++)
#define fd(i,j,k) for(i=j;i>=k;i--)
const int N=1e6+5,mo=998244353;
struct rec
{
ll v;
db t;
}s[N];
ll sum,t[N],v[N],l,r,n,L,prod,i,dec;
int main()
{
scanf("%lld %lld",&n,&L);
l=1;... | a.cc: In function 'int main()':
a.cc:24:13: error: reference to 'dec' is ambiguous
24 | dec=min(s[l].v,sum+v[i]-L);
| ^~~
In file included from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
from /usr/include/c+... |
s744321003 | p03744 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define ld long double
#define PI pair<ld,ll>
#define S second
#define F first
const int N=500005;
int n,L,top;
PI q[N];
ll sum[N];
ld ans[N];
PI operator +(PI a,PI b){
return mp((a.F*a.S+b.F*b.S)/(a.S+b.S),a.S+b.S);
}
int main(){
scanf("%d%d",&n,&L);... | a.cc: In function 'std::pair<long double, long long int> operator+(std::pair<long double, long long int>, std::pair<long double, long long int>)':
a.cc:14:16: error: 'mp' was not declared in this scope
14 | return mp((a.F*a.S+b.F*b.S)/(a.S+b.S),a.S+b.S);
| ^~
a.cc: In function 'int main(... |
s604726124 | p03744 | C++ | #include <iostream>
#include <cstdio>
#include <deque>
#include <iomanip>
using namespace std;
#define For(i , a , b) for (int i = a , _b = b ; i <= _b ; ++i)
#define Ford(i , a ,b) for (int i = a , _b = b : i >= _b ; --i)
#define Rep(i , n) for (int i = 0 , _n = n ; i < _n ; ++i)
#define sz(A) ((int)A.size())
#def... | a.cc:43:42: error: stray '#' in program
43 | sumTV -= #include <iostream>
| ^
a.cc: In function 'void Process()':
a.cc:43:43: error: 'include' was not declared in this scope
43 | sumTV -= #include <iostr... |
s195326705 | p03745 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N; cin >> N;
int cnt = 0;
vector<int> A(N);
for(int i = 0; i < N; i++){
cin >> A.at(i);
}
for(int i = 0; i < N; i++){
// same を抜ける
while (i+1 < N && A[i] == A[i+1]) ++i;
// up
if (i+1 < N && A[i] < A[i+1]) {
while ... | a.cc:27:3: error: 'cout' does not name a type
27 | cout << cnt << endl;
| ^~~~
a.cc:28:1: error: expected declaration before '}' token
28 | }
| ^
|
s275956920 | p03745 | C++ | int #include <bits/stdc++.h>
using namespace std;
int main() {
int N; cin >> N;
int cnt = 0;
vector<int> A(N);
for(int i = 0; i < N; i++){
cin >> A.at(i);
}
for(int i = 0; i < N; i++){
// same を抜ける
while (i+1 < N && A[i] == A[i+1]) ++i;
// up
if (i+1 < N && A[i] < A[i+1]) {
wh... | a.cc:1:5: error: stray '#' in program
1 | int #include <bits/stdc++.h>
| ^
a.cc:1:14: error: expected initializer before '<' token
1 | int #include <bits/stdc++.h>
| ^
a.cc: In function 'int main()':
a.cc:5:10: error: 'cin' was not declared in this scope
5 | int N; cin >> N;
... |
s269133923 | p03745 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin >> N;
int d[N];
for(int i=0;i<N;i++) cin >> d[i];
int count=1;
int needh=0;
for(int i=0;i<N;i++){
if(d[i]>[i+1] && needh==0)needh=1;
if(d[i]>[i+1] && needh==0)needh=-1;
if(needh==1 && d[i]<d[i+1]){
count++;
needh=0;
}
if(d[i]>d[i+1] &&... | a.cc: In function 'int main()':
a.cc:14:11: error: expected ',' before '+' token
14 | if(d[i]>[i+1] && needh==0)needh=1;
| ^
| ,
a.cc:14:11: error: expected identifier before '+' token
a.cc: In lambda function:
a.cc:14:15: error: expected '{' before '&&' token
14 | if(d[i]>[i+1] &&... |
s222774149 | p03745 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<cmath>
#include<vector>
#include<map>
using namespace std;
int main() {
int N; cin >> N;
vector<int> A(N);
for (int i = 0; i < N; ++i) cin >> A[i];
int res = 0;
//i+1<Nを条件に常に入れることが大事
for (int i = 0; i < N; ++i) {
// same ... | a.cc: In function 'int main()':
a.cc:30:25: error: expected '}' at end of input
30 | cout << res << endl;
| ^
a.cc:9:12: note: to match this '{'
9 | int main() {
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.