submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s480889577 | p03800 | C++ | #include<iostream>
#include<queue>
#include<bitset>
#include<algorithm>
#include<climits>
#include<vector>
#include<deque>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
#define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rep(i,n) repl(i,0,n)
#define fill(x,y... | a.cc:24:27: error: use of parameter outside function body before ']' token
24 | void print(int n, bool t[n]){
| ^
a.cc: In function 'void print(...)':
a.cc:25:9: error: 'n' was not declared in this scope
25 | rep(i,n){
| ^
a.cc:12:45: note: in definition of macro 'r... |
s472648815 | p03800 | C++ | #include <cstdio>
using namespace std;
int main() {
int n;
char s[100010], sw[100010];
scanf("%d", &n);
scanf("%100005s", s);
for (int i=0;i<4;i++) {
sw[0] = (i/2 == 0)?'S':'W';
sw[1] = (i%2 == 0)?'S':'W';
for (int j=2;j<n;j++) {
if ((sw[j-1] == 'S') == (s[j-1] == 'o')) {
sw[j]... | a.cc: In function 'int main()':
a.cc:26:42: error: expected ';' before 'else'
26 | if (sw[n-2] != sw[0]) valid = false
| ^
| ;
27 | else
| ~~~~
|
s763164631 | p03800 | C++ | import java.io.*;
import java.util.*;
/**
* @author baito
*/
public class Main
{
static StringBuilder sb = new StringBuilder();
static FastScanner sc = new FastScanner(System.in);
static int INF = 12345678;
static long LINF = 123456789123456789L;
static long MINF = -123456789123456789L;
stat... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.util.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: ... |
s044618123 | p03800 | C++ | import java.io.*;
import java.util.*;
/**
* @author baito
*/
public class Main
{
static StringBuilder sb = new StringBuilder();
static FastScanner sc = new FastScanner(System.in);
static int INF = 12345678;
static long LINF = 123456789123456789L;
static long MINF = -123456789123456789L;
stat... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.util.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: ... |
s654294789 | p03800 | C++ | #include <iostream>
#include <string>
using namespace std;
int n;
char s[100001] = {}, a[100001] = {}; // a -> animals; s -> answers
string ans;
bool solve(char x, char y){
a[1] = x;
a[2] = y;
bool a, b;
for(int i = 2; i <= n-1; i++)
a[i] == 'S'?
s[i] == 'o' ? a[i+1] = a[i-1] :
a[i-1] == 'S' ? a[i+1] = '... | a.cc: In function 'bool solve(char, char)':
a.cc:14:18: error: invalid types 'bool[int]' for array subscript
14 | a[i] == 'S'?
| ^
a.cc:15:40: error: invalid types 'bool[int]' for array subscript
15 | s[i] == 'o' ? a[i+1] = a[i-1] :
| ... |
s407969229 | p03800 | C++ | #pragma GCC optimize(2)
#include<bits/stdc++.h>
#include<cstdio>
#define mp make_pair
#define rep(i,n) for(int i=0;i<n;i++)
#define BINF 0x7fffffff
#define INF 0x3f3f3f3f
#define LINF 9223372036854775807
#define END(s) {cout<<s;return 0;}
#define CON(s) {cout<<s;continue;}
#define BRE(s) {cout<<s;break;}
#define pb pu... | a.cc: In function 'int main()':
a.cc:73:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
73 | gets(buf); gets(buf);
| ^~~~
| getw
|
s978154413 | p03800 | C++ | #pragma GCC optimize(2)
#include<bits/stdc++.h>
#define mp make_pair
#define rep(i,n) for(int i=0;i<n;i++)
#define BINF 0x7fffffff
#define INF 0x3f3f3f3f
#define LINF 9223372036854775807
#define END(s) {cout<<s;return 0;}
#define CON(s) {cout<<s;continue;}
#define BRE(s) {cout<<s;break;}
#define pb push_back
#define A... | a.cc: In function 'int main()':
a.cc:72:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
72 | gets(buf); gets(buf);
| ^~~~
| getw
|
s393663076 | p03800 | C++ | #include<iostream>
#include<Cstdio>
using namespace std;
int num;
string a,ans;
void deal()
{
for(int i=2; i<num; i++)
{
if(ans[i-1]=='S')
{
if(a[i-1]=='o')
ans+=ans[i-2];
else
{
if(ans[i-2]=='S')
ans+='W';
... | a.cc:2:9: fatal error: Cstdio: No such file or directory
2 | #include<Cstdio>
| ^~~~~~~~
compilation terminated.
|
s914944732 | p03800 | C++ | 9:31:51 PM
软1602刘坤 6/2/2018 9:31:51 PM
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <stdio.h>
using namespace std;
const int maxn=1e5+10;
int a[maxn];
char sto[maxn],st[maxn];
int n;
int judge()
{
for (int i=2;i<n-1;i++)
{
if (sto[i]=='w')
{
if (a[i]==1)
sto[i+1]... | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 9:31:51 PM
| ^
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
... |
s621572632 | p03800 | C++ | #include<stdio.h>
#include<iostream>
#include<string>
using namespace std;
string lie;
int zhong[1000005];
bool zhao(int a){
for(int i=2;i<a;i++){
if(lie[i-1]=='o'){
if(zhong[i-1]==0)zhong[i]=zhong[i-2];
else zhong[i]=(zhong[i-2]+1)%2;
}
else{
if(zhong[i-1... | a.cc: In function 'bool zhao(int)':
a.cc:28:24: error: 's1' was not declared in this scope; did you mean 's2'?
28 | if(zhong[1]==0)s1=zhong[2];
| ^~
| s2
a.cc:29:14: error: 's1' was not declared in this scope; did you mean 's2'?
29 | else s... |
s293891452 | p03800 | C++ | #include <iostream>
#include <queue>
#include <map>
#include <list>
#include <vector>
#include <string>
#include <stack>
#include <limits>
#include <climits>
#include <cassert>
#include <fstream>
#include <cstring>
#include <cmath>
#include <bitset>
#include <iomanip>
#include <algorithm>
#include <functional>
#include... | a.cc: In function 'void solve()':
a.cc:115:40: error: cannot bind non-const lvalue reference of type 'std::_Bit_reference&' to an rvalue of type 'std::_Bit_iterator::reference'
115 | for (auto &a : isS) {
| ^~~
|
s787904584 | p03800 | C++ | #include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;
#define rep(i,n) for(long long i = 0; i < (long long)(n); i++)
#define repi(i,a,b) for(long long i = (long long)(a); i < (long long)(b); i++)
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define mt make... | a.cc: In function 'int main()':
a.cc:74:21: error: expected ';' before '}' token
74 | return 0
| ^
| ;
75 | }
| ~
|
s387202002 | p03800 | C | #include <cstdio>
int n;
char s[100001],r[100001];
bool c(char a,char b)
{
r[0]=a;
r[1]=b;
for (int i=2; i<n; ++i)
r[i]=r[i-1]=='S'?s[i-1]=='o'?r[i-2]:r[i-2]=='S'?'W':'S':s[i-1]=='x'?r[i-2]:r[i-2]=='S'?'W':'S';
return !(r[n-1]=='S'&&((s[n-1]=='o'&&r[n-2]!=r[0])||(s[n-1]=='x'&&r[n-2]==r[0])))&&
... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s616174108 | p03800 | C++ | #include<string>
#include<deque>
#include<queue>
#include<vector>
#include<algorithm>
#include<iostream>
#include<set>
#include<cmath>
#include<tuple>
#include<chrono>
#include<functional>
#include<iterator>
#include<random>
#include<unordered_set>
#include<map>
using namespace std;
typedef long long int llint;
#define... | a.cc: In function 'int main()':
a.cc:59:21: error: 'i' was not declared in this scope
59 | for(i=1;i<=n;i++){
| ^
|
s271627151 | p03800 | C++ | #include<string>
#include<deque>
#include<queue>
#include<vector>
#include<algorithm>
#include<iostream>
#include<set>
#include<cmath>
#include<tuple>
#include<chrono>
#include<functional>
#include<iterator>
#include<random>
#include<unordered_set>
#include<map>
using namespace std;
typedef long long int llint;
#define... | a.cc: In function 'int main()':
a.cc:52:23: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int)'
52 | string ans(n+2);
| ^
In file included from /usr/include/c++/14/string:54,
from a.cc:1:
/usr/include/c++/14/bits/basic_str... |
s123007838 | p03800 | C++ | #include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
char *search(char a, char b, char *s, int N) {
char *ans = (char *)malloc(N + 2);
ans[0] = a;
ans[1] = b;
for (int i = 0; i < N - 1; i++) {
if (s[i + 1] == 'o' && ans[i + 1] == 'S') {
ans[i + 2] = ans[i];
} else if (... | a.cc: In function 'char* search(char, char, char*, int)':
a.cc:35:44: error: invalid types 'char[int]' for array subscript
35 | if (ans[N-1] == ans[N + 1] && ans[0] == a[N]) {
| ^
a.cc:42:7: warning: control reaches end of non-void function [-Wreturn-type]
42 | ... |
s649110095 | p03800 | C++ | #include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
char *search(char a, char b, char *s, int N) {
char *ans = (char *)malloc(N + 2);
ans[0] = a;
ans[1] = b;
for (int i = 0; i < N - 1; i++) {
if (s[i + 1] == 'o' && ans[i + 1] == 'S') {
ans[i + 2] = ans[i];
} else if (... | a.cc: In function 'char* search(char, char, char*, int)':
a.cc:32:12: error: expected ']' before ';' token
32 | ans[N; !] = 'S';
| ^
| ]
a.cc:32:15: error: expected primary-expression before ']' token
32 | ans[N; !] = 'S';
| ^
a.cc:35:46: error: in... |
s312018189 | p03800 | C++ | Snuke, who loves animals, built a zoo.
There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbered i(2≤i≤N−1) is adjacent to the animals numbered i−1 and i+1. Also, the animal numbered 1 is adjacent to the animals numbered 2 and N, and the animal numbered N... | a.cc:2:126: error: extended character ≤ is not valid in an identifier
2 | There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbered i(2≤i≤N−1) is adjacent to the animals numbered i−1 and i+1. Also, the animal numbered 1 is adjacent to the animals numb... |
s190345124 | p03800 | C++ | dsad | a.cc:1:1: error: 'dsad' does not name a type
1 | dsad
| ^~~~
|
s196796811 | p03800 | C++ | #include <bits/stdc++.h>
using namespace std;
//#define FILE_IO
int N;
char s[100005];
int v[100005];
int main()
{
#ifdef FILE_IO
freopen("1.in", "r", stdin);
freopen("1.out", "w", stdout);
#endif
scanf("%d\n", &N);
gets(s + 1);
for(int i = 1; i <= N; i++)
{
if(s[i] == 'o')
... | a.cc: In function 'int main()':
a.cc:19:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
19 | gets(s + 1);
| ^~~~
| getw
|
s704617733 | p03800 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(int)(b);i++)
#define rep(i,b) FOR(i,0,b)
typedef long long ll;
const int SIZE=5+1e6;
const int INF=10+1e9;
ll n;
bool issure(bool x[SIZE]){
rep(i,n){
if(x[i]==A[i]) if(x[(i+1)%n]!=x[(i-1+n)%n])return false;
if(x[i]!=A[i]) if(x... | a.cc: In function 'bool issure(bool*)':
a.cc:13:14: error: 'A' was not declared in this scope
13 | if(x[i]==A[i]) if(x[(i+1)%n]!=x[(i-1+n)%n])return false;
| ^
a.cc:14:14: error: 'A' was not declared in this scope
14 | if(x[i]!=A[i]) if(x[(i+1)%n]==x[(i-1+n)%n])return false;
| ... |
s767088763 | p03800 | C | i,n;char a[100002],s[999999];f(x,y){*a=x;a[1]=y;for(i=0;++i<=n;)a[i+1]=a[i]==87^a[i-1]==87^s[i]=='o'?83:87;if(!strncmp(a,a+n,2))a[n]=0,puts(a),exit(0);} main(){scanf("%d%s",&n,&s);strncat(s,s,n);f(83,83);f(83,87);f(W,83);f(W,W);puts("-1");} | main.c:1:1: warning: data definition has no type or storage class
1 | i,n;char a[100002],s[999999];f(x,y){*a=x;a[1]=y;for(i=0;++i<=n;)a[i+1]=a[i]==87^a[i-1]==87^s[i]=='o'?83:87;if(!strncmp(a,a+n,2))a[n]=0,puts(a),exit(0);} main(){scanf("%d%s",&n,&s);strncat(s,s,n);f(83,83);f(83,87);f(W,83);f(W,W);puts("-1");}
... |
s205516603 | p03800 | Java | import java.util.Arrays;
import java.util.Scanner;
public class MainD {
MyScanner sc = new MyScanner();
Scanner sc2 = new Scanner(System.in);
long start = System.currentTimeMillis();
long fin = System.currentTimeMillis();
final int MOD = 1000000007;
int[] dx = { 1, 0... | Main.java:4: error: class MainD is public, should be declared in a file named MainD.java
public class MainD {
^
1 error
|
s264206454 | p03800 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
using ll=long long;
using vi=vector<int>;
using vl=vector<long long>;
using pii=pair<int,int>;
using pll=pair<long long,long long>;
#define ITR(i,c) for(auto i=begin(c);i!=end(c);++i)
#define FORE(x,c) for(auto &x:c)
#define FOR(i,a,n) for(int i=a,i##_... | a.cc: In function 'bool hoge(std::vector<bool>&)':
a.cc:67:40: error: expected primary-expression before ';' token
67 | ret=(t[i-1]==t[0]),;
| ^
a.cc:78:28: error: expected ',' before '-' token
78 | ret=([i-1]==t[0]);
| ... |
s046319713 | p03800 | C++ | #include <algorithm>
#include <cmath>
#include <climits>
#include <cstring>
#include <cstdio>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map> //pair is also included in this library
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#inc... | a.cc: In function 'int main()':
a.cc:70:5: error: expected ',' or ';' before 'if'
70 | if(s[0] == 'o' && !ans[0]){
| ^~
|
s182046922 | p03800 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<set>
#include<algorithm>
#include<queue>
#include<functional>
#include<numeric>
#include<sstream>
#include<math.h>
#include <iomanip>
#define ll long long
#define PLL pair<ll,ll>
#define VS vector<string>
#define VL vector<ll>
#define rep(i,a) for (ll i=0;i<... | a.cc: In function 'int main()':
a.cc:103:12: error: redeclaration of 'std::vector<long long int> sum'
103 | VL sum(n,-1);
| ^~~
a.cc:100:12: note: 'std::vector<long long int> sum' previously declared here
100 | VL sum(n, -1);
| ^~~
a.cc:106:12: error: redeclaration ... |
s068604363 | p03800 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
int main()
{
string line;
getline(cin, line);
const int N = stoi(line);
getline(cin, line);
vector<char> cands = {'S', 'W'};
for(char first : cands)
{
for(char second : cands)
{
vector<char> ans(N);
ans[0] = fi... | a.cc: In function 'int main()':
a.cc:15:3: error: 'vector' was not declared in this scope
15 | vector<char> cands = {'S', 'W'};
| ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
2 | #include <algorithm>
+++ |+#include <vecto... |
s475088360 | p03800 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
int main()
{
string line;
getline(cin, line);
const int N = stoi(line);
getline(cin, line);
vector<char> cands = {'S', 'W'};
for(char first : cands)
{
for(char second : cands)
{
vector<char> ans(N);
ans[0] = fi... | a.cc: In function 'int main()':
a.cc:15:3: error: 'vector' was not declared in this scope
15 | vector<char> cands = {'S', 'W'};
| ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
2 | #include <algorithm>
+++ |+#include <vecto... |
s433956079 | p03800 | C | #include<cstdio>
using namespace std;
int main(void)
{
//3つの狼の合計が偶数->〇
//S->0 W->1
//S->0x53
//W->0x57
//o->0x6f
//x->0x78
long long int N, i, h, x = 0, ok = 0;
char c;
static char say[100015];
static long long int dou[100015];
long long int sta[2];
scanf("%lld", &N);
fflush(stdin);
for (i = 0; i < N; i+... | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s342267159 | p03800 | C | #include<stdio.h>
int main(void)
{
//3つの狼の合計が偶数->〇
//S->0 W->1
//S->0x53
//W->0x57
//o->0x6f
//x->0x78
long long int N, i, h, x = 0, ok = 0;
char c;
static char say[100015];
static long long int dou[100015];
long long int sta[2];
scanf("%lld", &N);
fflush(stdin);
for (i = 0; i < N; i++) {
scanf("%c", &... | main.c: In function 'main':
main.c:32:41: error: expected expression before '=' token
32 | for (i = 1; i < =N; i++) {
| ^
|
s712392207 | p03800 | C++ | #include <iostream>
#include <string>
#include <cstdint>
using namespace std;
char next(char before, char now, char ans)
{
auto inv = [](char animalType){ return animalType == 'S' ? 'W' : 'S'; };
char result{ before };
if(ans != 'o') {
result = inv(result);
}
if(now != 'S') {
result = inv(result);
}
ret... | a.cc: In function 'int main()':
a.cc:47:46: error: 'ans' was not declared in this scope; did you mean 'abs'?
47 | flag = judge(result, ans);
| ^~~
| abs
|
s041172746 | p03800 | C++ | #include <iostream>
#include <string>
#include <cstdint>
using namespace std;
char next(char before, char now, char ans)
{
auto inv = [](char animalType){ return animalType == 'S' ? 'W' : 'S'; };
char result{ before };
if(ans != 'o') {
result = inv(result);
}
if(now != 'S') {
result = inv(result);
}
ret... | a.cc: In function 'int main()':
a.cc:40:28: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int_least32_t)'
40 | string result(n + 1);
| ^
In file included from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bi... |
s490292017 | p03800 | C++ | #include <iostream>
#include <string>
#include <cstdint>
using namespace std;
char next(char before, char now, char ans)
{
auto inv = [](char animalType){ return animalType == 'S' ? 'W' : 'S'; };
char result{ before };
if(ans != 'o') {
result = inv(result);
}
if(now != 'S') {
result = inv(result);
}
ret... | a.cc: In function 'bool judge(std::string&, std::string)':
a.cc:29:30: error: 'n' was not declared in this scope
29 | return str[0] == str[n];
| ^
|
s473972503 | p03800 | C++ | #include <iostream>
#include <string>
#include <cstdint>
using namespace std;
char next(char before, char now, char ans)
{
auto inv = [](char animalType){ return animalType == 'S' ? 'W' : 'S'; };
char result{ before };
if(ans != 'o') {
result = inv(result);
}
if(now != 'S') {
result = inv(result);
}
ret... | a.cc: In function 'bool judge(std::string&, std::string)':
a.cc:29:30: error: 'n' was not declared in this scope
29 | return str[0] == str[n];
| ^
a.cc: In function 'int main()':
a.cc:41:32: error: expected ')' before '{' token
41 | if(judge(result, input) {
... |
s208920546 | p03800 | C++ | #include <iostream>
#include <string>
#include <cstdint>
using namespace std;
char next(char before, char now, char ans)
{
auto inv = [](char animalType){ return animalType == 'S' ? 'W' : 'S'; };
char result{ before };
if(ans != 'o') {
result = inv(result);
}
if(now != 'S') {
result = inv(result);
}
ret... | a.cc: In function 'bool judge(std::string&, std::string)':
a.cc:25:29: error: 'n' was not declared in this scope
25 | for(auto i = 1; i < n; ++i) {
| ^
a.cc:29:30: error: 'n' was not declared in this scope
29 | return str[0] == str[n];
| ... |
s794303651 | p03800 | C++ | #include<bits/stdc++.h>
using namespace std;
#define FOR(i,s,e) for (int i=s;i<e;i++)
#define FOE(i,s,e) for (int i=s;i<=e;i++)
#define FOD(i,s,e) for (int i=s;i>=e;i--)
#define SET(a,e) memset(a,e,sizeof(a))
#define LL long long
#define LD long double
#define pb push_back
#define x first
#define y second
#define PII p... | a.cc: In function 'void solve(bool, bool)':
a.cc:46:23: error: 'i' was not declared in this scope
46 | if (s[i] == 'o' && ans[n - 1] != ans[1]) return;
| ^
a.cc:47:23: error: 'i' was not declared in this scope
47 | if (s[i] == 'x' && ans[n - 1] == ans[1]... |
s501523645 | p03801 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
using namespace std;
#define INF ((1<<30)-1)
#define LINF (1LL<<60)
#define EPS (1e-10)
typedef long long ll;
typedef pair<ll, ll> P;
const int MOD = 1000000007;
const int MOD2 = 998244353;
vector... | a.cc: In function 'int main()':
a.cc:24:17: error: no matching function for call to 'std::vector<std::pair<long long int, long long int> >::push_back(int, int)'
24 | vp.push_back(0, 0);
| ~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/f... |
s544356477 | p03801 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
using namespace std;
#define INF ((1<<30)-1)
#define LINF (1LL<<60)
#define EPS (1e-10)
typedef long long ll;
typedef pair<ll, ll> P;
const int MOD = 1000000007;
const int MOD2 = 998244353;
vector... | a.cc: In function 'int main()':
a.cc:28:18: error: no matching function for call to 'min(int&, long long int&)'
28 | idx = min(idx, vp[i].second);
| ~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bi... |
s387609375 | p03801 | C++ | #include<bits/stdc++.h>
//#include<atcoder/all>
using namespace std;
//using namespace atcoder;
#define rep(i,n) for(ll i=0;i<n;i++)
#define repl(i,l,r) for(ll i=(l);i<(r);i++)
#define per(i,n) for(ll i=n-1;i>=0;i--)
#define perl(i,r,l) for(ll i=r-1;i>=l;i--)
#define fi first
#define se second
#define pb push_back
#def... | a.cc: In function 'int main()':
a.cc:173:17: error: no match for 'operator+' (operand types are 'std::pair<const long long int, long long int>' and 'int')
173 | auto p1 = p + 1;
| ~ ^ ~
| | |
| | int
| std::pair<const long long in... |
s230490884 | p03801 | C++ | //=======================//
// coder: Andy - Tohrumi //
//=======================//
#include <bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(); cin.tie(0); cout.tie(0);
#define rep(i, a, b) for(__typeof(b) i = a; i < b; i++)
#define Rep(i, a, b) for(__typeof(a) i = a; i > b; i--)
#defin... | a.cc: In function 'int main()':
a.cc:22:9: error: 'll' was not declared in this scope
22 | ll ans[n];
| ^~
a.cc:24:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
24 | ans[i] = 0;
| ^~~
| abs
a.cc:33:17: error: ... |
s034672851 | p03801 | C++ | #include<bits/stdc++.h>
using ll = long long;
using namespace std;
const ll INF = 10000000000000000;
const ll mod = 1000000007;
ll test[1234567811], kosuu[1234567811], saishou[1234567811];
ll ans[12345678];
signed main() {
ll n, m; cin >> n;
vector<ll> v, kari;
for (int h = 1; h <= n; h++) {
cin >> test[h];
kosu... | /tmp/cc5gjusb.o: in function `main':
a.cc:(.text+0x91): relocation truncated to fit: R_X86_64_PC32 against symbol `kosuu' defined in .bss section in /tmp/cc5gjusb.o
a.cc:(.text+0xa8): relocation truncated to fit: R_X86_64_PC32 against symbol `kosuu' defined in .bss section in /tmp/cc5gjusb.o
a.cc:(.text+0xf9): relocati... |
s208233790 | p03801 | C++ | Frequency | a.cc:1:1: error: 'Frequency' does not name a type
1 | Frequency
| ^~~~~~~~~
|
s362969942 | p03801 | C++ | #include <algorithm>
#include <cmath>
#include <complex>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#include <functional>
#include <cstring>
#include <regex>
#include <random>
#include <cassert>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ... | a.cc: In function 'int main()':
a.cc:56:24: error: no matching function for call to 'chmax(int&, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&)'
56 | rep(i, n) if (chmax(max_a, a[i])) idxs.push_back(i);
| ~~~~~^~~~~~~~~~~~~
a.cc:27:31: note: candidat... |
s612340918 | p03801 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int)n; i++)
using ll = long long;
template <typename T>
class SegTree{
using F = function<T(T,T)>;
int n; T uni; F f;
vector<T> dat;
T query_sub(int a, int b, int k, int l, int r) {
if(r <= a || b <= l) return uni;
if(a... | a.cc: In function 'int main()':
a.cc:49:26: error: 'p' was not declared in this scope
49 | for(auto k : s) m[k] = p++;
| ^
a.cc:50:11: error: 'p' was not declared in this scope
50 | cout << p << endl;
| ^
|
s273685611 | p03801 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
int main()
{
ll n ;
cin >> n ;
vector<ll> ans(n);
vector<ll> a(n);
rep(i, n){
cin >> a[i];
}
map<ll,pair<ll,ll>> m;
rep(i,n){
m[a[i]].first++;
if(m[a[i]].first==1)m[a[i]].second=i+1;
}
ll num=0,... | a.cc: In function 'int main()':
a.cc:38:29: error: 'i' was not declared in this scope
38 | ans[minitr]+=(cnt+sum)*(num-i->first);
| ^
|
s329359990 | p03801 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <cmath>
#include <tuple>
#include <cstdio>
#include <bitset>
#include <sstream>
#include <iterator>
#include <numeric>
#include <map>
#include <cstring>
#include <set>
#include <functional>
#include <... | a.cc: In function 'int main(int, const char**)':
a.cc:76:30: error: no matching function for call to 'min(std::map<int, long long int>::mapped_type&, int)'
76 | mparg[a[i]] = min(mparg[a[i]],i+1);
| ~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
... |
s101937407 | p03801 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mp make_pair
#define pb push_back
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
int a[n];
pair<ll,ll> p[n];
rep(i,n){
... | a.cc: In function 'int main()':
a.cc:29:12: error: no matching function for call to 'min(int&, long long int&)'
29 | ind=min(ind, p[i].second);
| ~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51... |
s810551716 | p03801 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
#define ALL(obj) (obj).begin(), (obj).end()
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
long long c=a%i_7;
if(c>=0)retu... | a.cc: In function 'int main()':
a.cc:140:5: error: 'cnt' was not declared in this scope; did you mean 'int'?
140 | cnt += ans[cand[i-1]];
| ^~~
| int
a.cc:142:33: error: 'cnt' was not declared in this scope; did you mean 'int'?
142 | ans[cand[s-1]] += csum[n-1] - cnt;
| ... |
s418687696 | p03801 | C++ | #include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
#define ALL(obj) (obj).begin(), (obj).end()
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
long long c=a%i_7;
if(c>=0)retu... | a.cc: In function 'int main()':
a.cc:140:27: error: overloaded function with no contextual type information
140 | count += ans[cand[i-1]];
| ^
a.cc:142:31: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator-'
142 | a... |
s893708466 | p03801 | C++ | int N;
ll A[101010];
vector<int> V;
ll ret[101010];
void solve() {
int i,j,k,l,r,x,y; string s;
cin>>N;
map<ll,ll> M;
FOR(i,N) cin>>A[i], M[A[i]]++;
V.push_back(0);
for(i=1;i<N;i++) if(A[V.back()]<A[i]) V.push_back(i);
for(i=V.size()-2;i>=0;i--) {
auto r=*M.rbegin();
M.erase(r.first);
ret[V[i+1]] +=... | a.cc:2:1: error: 'll' does not name a type
2 | ll A[101010];
| ^~
a.cc:3:1: error: 'vector' does not name a type
3 | vector<int> V;
| ^~~~~~
a.cc:4:1: error: 'll' does not name a type
4 | ll ret[101010];
| ^~
a.cc: In function 'void solve()':
a.cc:8:28: error: 'string' was not declared in ... |
s592766338 | p03801 | C++ | int N;
ll A[100010];
ll ans[100010];
{
pair<int, int> last;
int stk, left;
rd(N, A(N));
priority_queue<pair<int, int>> pq;
REP(i, N) pq.emplace(A[i], i);
stk = 0;
left = pq.top().second;
while (!pq.empty()) {
last = pq.top();
int now, next;
now = pq.top().first;
... | a.cc:2:1: error: 'll' does not name a type
2 | ll A[100010];
| ^~
a.cc:3:1: error: 'll' does not name a type
3 | ll ans[100010];
| ^~
a.cc:5:1: error: expected unqualified-id before '{' token
5 | {
| ^
|
s646527771 | p03801 | C++ | #include<cstdio>
#include<algorithm>
#define int long long;
using namespace std;
struct arr
{
int aa,bb;
}a[100010];
int n;
long long b[100010];
int cmp(arr x,arr y)
{
if (x.aa!=y.aa) return x.aa>y.aa;
return x.bb<y.bb;
}
signed main()
{
scanf("%lld",&n);
for (int i=1;i<=n;i++)
{
sca... | a.cc:3:18: error: declaration does not declare anything [-fpermissive]
3 | #define int long long;
| ^~~~
a.cc:7:4: note: in expansion of macro 'int'
7 | int aa,bb;
| ^~~
a.cc:7:8: error: 'aa' does not name a type
7 | int aa,bb;
| ^~
a.cc:3:18: error: declar... |
s844995933 | p03801 | C++ | #pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include<bits/stdc++.h>
#define For(i,j,k) for(int i=j;i<=k;++i)
#define Dow(i,j,k) for(int i=k;i>=j;--i)
#define ll long long
#define int ll
#define pb push_back
using n... | cc1plus: error: '::main' must return 'int'
|
s612887740 | p03801 | C++ | n = int(input())
a = list(map(int, input().split()))
ans = [0]*n
b = []
for i, x in enumerate(a):
b.append([-x, i])
b.sort()
c = []
p = b[0]
x = [-b[0][0], b[0][1], 1]
for i in range(1, n):
if -b[i][0] == x[0]:
x[2] = i+1
else:
c.append(x)
x = [-b[i][0], b[i][1], i+1]
c.append(x... | a.cc:1:1: error: 'n' does not name a type
1 | n = int(input())
| ^
|
s548038380 | p03801 | C++ | //#define NDEBUG
#define _CRT_SECURE_NO_WARNINGS
#include <array>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <limits>
#include <memory>
#include <string>
#include <type_traits>
template <class Integral> class Rirange;
template <class Integral = std::size_t> class irange {
public:
using value_ty... | a.cc:250:67: error: template argument 1 is invalid
250 | class Compare = std::less<typename Container::value_type>>
| ^~
a.cc:251:16: error: definition of 'class Compress' inside template parameter list
251 | class Compress {
| ... |
s445393681 | p03801 | C++ | //#define NDEBUG
#define _CRT_SECURE_NO_WARNINGS
#include <array>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <limits>
#include <memory>
#include <string>
#include <type_traits>
template <class Integral> class Rirange;
template <class Integral = std::size_t> class irange {
public:
using value_ty... | a.cc: In function 'int main()':
a.cc:315:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
315 | return;
| ^~~~~~
|
s655137138 | p03801 | C++ | //#define NDEBUG
#define _CRT_SECURE_NO_WARNINGS
#include <array>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <limits>
#include <memory>
#include <string>
#include <type_traits>
template <class Integral> class Rirange;
template <class Integral = std::size_t> class irange {
public:
using value_ty... | a.cc: In function 'int main()':
a.cc:313:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
313 | return;
| ^~~~~~
|
s830207600 | p03801 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(long long int (i)=0;(i)<(int)(n);(i)++)
#define rrep(i,a,b) for(long long int i=(a);i<(b);i++)
#define rrrep(i,a,b) for(long long int i=(a);i>=(b);i--)
#define all(v) (v).begin(), (v).end()
#define pb(q) push_back(q)
#define Abs(a,b) max(a,b)-min(a,b)
#define YES(condition... | a.cc: In function 'int main()':
a.cc:139:12: error: expected primary-expression before 'if'
139 | if(p[i].first!=p[i+1].first){
| ^~
a.cc:144:12: error: 'else' without a previous 'if'
144 | else{
| ^~~~
|
s441162285 | p03801 | C++ | #include "bits/stdc++.h"
#define ALL(g) (g).begin(),(g).end()
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i,n) REP(i,0,n)
#define RREP(i, x, n) for(int i = x; i >= n; i--)
#define rrep(i, n) RREP(i,n,0)
#define pb push_back
#define show_table(n, k, table) rep(i,n){ rep(j,k) cout << table[i][j] << " "; ... | a.cc:21:7: error: conflicting declaration 'using vi = class std::vector<long long int>'
21 | using vi = vector<ll>;
| ^~
a.cc:19:7: note: previous declaration as 'using vi = class std::vector<int>'
19 | using vi = vector<int>;
| ^~
a.cc: In function 'int main()':
a.cc:39:3: error: 'vl' was... |
s760846691 | p03801 | C++ | #include "bits/stdc++.h"
#define ALL(g) (g).begin(),(g).end()
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i,n) REP(i,0,n)
#define RREP(i, x, n) for(int i = x; i >= n; i--)
#define rrep(i, n) RREP(i,n,0)
#define pb push_back
#define show_table(n, k, table) rep(i,n){ rep(j,k) cout << table[i][j] << " "; ... | a.cc: In function 'int main()':
a.cc:38:3: error: 'vl' was not declared in this scope; did you mean 'vi'?
38 | vl ans(N);
| ^~
| vi
a.cc:46:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
46 | ans[mi] += diff * ll(i+1);
| ^~~
| abs
a.cc:48:20: error: '... |
s519493262 | p03801 | C++ | #include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
bool cmp(const pair<int, int>& p1, const pair<int, int>& p2) {
return p1.first > p2.first;
}
int main(void) {
int n;
cin >> n;
vector <pair <int, int> > a(n);
for (int i = 0; i < n; i++) {
cin >> a[i].first;
a[i].second =... | a.cc: In function 'int main()':
a.cc:16:3: error: 'sort' was not declared in this scope; did you mean 'short'?
16 | sort(a.begin(), a.end(), cmp);
| ^~~~
| short
|
s868163044 | p03801 | C++ | #include<bits/stdc++.h>
#define ll long long
using namespace std;
const int N=100010;
int n,a[N],rank[N];
ll ans[N];
int cmp(int aa,int bb){
// if(a[aa]==a[bb]) return aa>bb;
return a[aa]>a[bb];
}
int main(){
scanf("%d",&n);
for(int i=1;i<=n;i++) scanf("%d",&a[i]);
for(int i=0;i<=n;i++) rank[i]=i;
sort(rank,rank+n... | a.cc: In function 'int main()':
a.cc:14:31: error: reference to 'rank' is ambiguous
14 | for(int i=0;i<=n;i++) rank[i]=i;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64,
... |
s640400325 | p03801 | 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--)
#define mod 1e9+7
__attribute__((constructor))
void initial() {
cin.tie(0);
ios::sync_with_stdio(false);
}
struct pa {... | a.cc: In function 'int main()':
a.cc:39:14: error: no matching function for call to 'min(ll&, int&)'
39 | m = min(m, a[i + 1].i);
| ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s354859410 | p03801 | C++ | #include<bits/stdc++.h>
using namespace std;
long long N;
long long a[100005];
long long ans[100005];
// val , num
map<long long, long long> memo;
// pos
vector<long long> V;
int main(){
cin >> N;
for(long long i = 0; i < N; i++){
cin >> a[i];
memo[a[i]]++;
}
V.push_back(0);
for(long long i = 1... | a.cc: In function 'int main()':
a.cc:34:27: error: 'r' was not declared in this scope
34 | ans[0] += r.first * m.second;
| ^
|
s948229149 | p03801 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ll N;
cin >> N;
ll a[N];
for(ll i = 0; i < N; i++)
cin >> a[i];
map<ll, vector<ll> > mp;
for(ll i = 0; i < N; i++) {
mp[a[i]].push_back(i + 1);
}
cout << mp << endl;
vector< pair<ll, vector<ll> > > v;
for... | a.cc: In function 'int main()':
a.cc:20:8: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::map<long long int, std::vector<long long int> >')
20 | cout << mp << endl;
| ~~~~ ^~ ~~
| | |
| | std::map<long long int, std:... |
s722420141 | p03801 | C++ | #include <cstdio>
#include <iostream>
#include <cmath>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <cstdlib>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#include <set>
#include <memory.h>
#include <iomanip>
#include <bitset>
#include <list>
#include <stack>
using namesp... | a.cc: In function 'int main()':
a.cc:48:31: error: no matching function for call to 'min(long long int&, int&)'
48 | minindex = min(minindex, tmp[i].second);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr... |
s406514514 | p03801 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
#include <numeric>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <time.h>
#include <limits.h>
using namespace std;
typedef long long ll;
#define pl pair<ll,ll>
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep... | a.cc:53:2: error: stray '#' in program
53 | }#include <iostream>
| ^
a.cc:53:3: error: 'include' does not name a type
53 | }#include <iostream>
| ^~~~~~~
a.cc:80:4: error: redefinition of 'll n'
80 | ll n,j=LLONG_MAX;
| ^
a.cc:28:4: note: 'll n' previously declared here
28 | ll n,j=L... |
s694229225 | p03801 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
#include <numeric>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <time.h>
using namespace std;
typedef long long ll;
#define pl pair<ll,ll>
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) for(int i=0;i<... | a.cc:27:8: error: 'LLONG_MAX' was not declared in this scope
27 | ll n,j=LLONG_MAX;
| ^~~~~~~~~
a.cc:10:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
9 | #include <queue>
+++ |+#include <climits>
10 | #include <time.h>
|
s338004279 | p03801 | C++ | hoge | a.cc:1:1: error: 'hoge' does not name a type
1 | hoge
| ^~~~
|
s455039247 | p03801 | C++ | #include <iostream>
#include <utility>
#include <algorithm>
#include <climits>
int main(int argc, char **argv) {
long long int n=0;
std::cin >> n;
long long int *ret = new long long int[n];
std::vector<std::pair<long long int, long int> > v;
for(long long int i=0; i < n; i++) ... | a.cc: In function 'int main(int, char**)':
a.cc:12:14: error: 'vector' is not a member of 'std'
12 | std::vector<std::pair<long long int, long int> > v;
| ^~~~~~
a.cc:5:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
4 | #i... |
s568904680 | p03801 | C++ | #include<bits/stdc++.h>
#define ul unsigned long
using namespace std;
int main(){
cin.tie(0);ios::sync_with_stdio(false);
ul n;ul tmp; ul m=0;
cin>>n;
vector<pair<ul,ul> >l;vector<ul long>ans(n);
l.reserve(n+1);
for(ul i=0;i<n;++i){cin>>tmp;l[i].emplace_back(make_pair(tmp,i));}
l.emplace_back(make_pair(0... | a.cc: In function 'int main()':
a.cc:10:37: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long unsigned int, long unsigned int> >, std::pair<long unsigned int, long unsigned int> >::value_type' {aka 'struct std::pair<long unsigned int, long unsigned int>'} has no member named 'emplace_back'
10 | for(u... |
s919488568 | p03801 | C++ | #include<bits/stdc++.h>
int main(){
std::cin.tie(0);
std::ios::sync_with_stdio(false);
long n;unsigned long tmp; long m=0;
std::array<std::pair<unsigned long,unsigned long> > ls;
std::cin >> n;
unsigned long long ans[n];
ls.resize(n+1);
for(long i=0; i<n; ++i) {std::cin >> tmp;ls[i]=(std::make_pair(tmp... | a.cc: In function 'int main()':
a.cc:6:53: error: wrong number of template arguments (1, should be 2)
6 | std::array<std::pair<unsigned long,unsigned long> > ls;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /u... |
s411711305 | p03801 | C++ | #include<bits/stdc++.h>
int main(){
std::cin.tie(0);
ios::sync_with_stdio(false);
long n;unsigned long tmp; long m=0;
std::array<std::pair<unsigned long,unsigned long> > ls;
std::cin >> n;
unsigned long long ans[n];
ls.resize(n+1);
for(long i=0; i<n; ++i) {std::cin >> tmp;ls[i]=(std::make_pair(tmp,i));... | a.cc: In function 'int main()':
a.cc:4:3: error: 'ios' has not been declared
4 | ios::sync_with_stdio(false);
| ^~~
a.cc:6:53: error: wrong number of template arguments (1, should be 2)
6 | std::array<std::pair<unsigned long,unsigned long> > ls;
| ... |
s439476295 | p03801 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
#include<stack>
#include<climits>
#include<cstring>
#include<queue>
#include<map>
#include<functional>
using namespace std;
typedef unsigned long long ull;
const int INF = INT_MAX/3;
int main(){
int N;
cin >> N;
vect... | a.cc: In function 'int main()':
a.cc:34:24: error: no matching function for call to 'min(int&, long long unsigned int&)'
34 | secondMin = min(secondMin, pairList[i].second);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
fr... |
s705953231 | p03801 | C++ | #include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define debug0(x) printf("! %d\n", x);
#define debug1(x, a, b) for(int (ii)=(a);(ii)<(b);(ii++)) printf("%d: %d\n", ii, x[ii]);
#define nono(x, ite) for(__typeof((x).begin()) (ite)=(x).begin();(i... | a.cc: In function 'int main()':
a.cc:47:25: error: 'i' was not declared in this scope
47 | printf("%I64d\n", a[i]);
| ^
|
s023507848 | p03801 | Java | import java.util.Arrays;
import java.util.Scanner;
public class MainE {
MyScanner sc = new MyScanner();
Scanner sc2 = new Scanner(System.in);
long start = System.currentTimeMillis();
long fin = System.currentTimeMillis();
final int MOD = 1000000007;
int[] dx = { 1, 0... | Main.java:4: error: class MainE is public, should be declared in a file named MainE.java
public class MainE {
^
1 error
|
s739770186 | p03801 | Java | import java.util.*;
class Main {
static int N;
static int[] a;
static long[][] is;
static long[] freq;
static long[] cum;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
N = sc.nextInt();
a = new int[N];
is = new long[2][N];
freq = new long[N + 1];
cum = new long[N];
... | Main.java:39: error: incompatible types: possible lossy conversion from long to int
int t = binarySearch(a, is[0][i]);
^
Main.java:40: error: incompatible types: possible lossy conversion from long to int
int s = binarySearch(a, is[0][i - 1]);
^
Main... |
s814717904 | p03801 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <functional>
#include <set>
#include <cmath>
#include <map>
using namespace std;
typedef pair<long long int, long long int> P;
int main() {
long long int n;
cin >> n;
vector<long long int> a(n, 0);
vector<long long int> b(n, 0);
set<long long int> ... | a.cc: In function 'int main()':
a.cc:30:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
30 | sort(v.begin(), v.end(), greater<P>());
| ^~~~
| sqrt
|
s865771079 | p03801 | C | #include<stdio.h>
long long sum[100000];
typedef struct{
long long a;
long id;
} stone;
stone a[100000];
int cmp(const void *a, const void *b){
if(((stone*)a)->a==((stone)*b)->a){
return ((stone*)a)->id-((stone)*b)->id;
}
return ((stone*)a)->b-((stone)*b)->a;
}
int main(int argc, char const *argv[]) {
long ... | main.c: In function 'cmp':
main.c:12:36: warning: dereferencing 'void *' pointer
12 | if(((stone*)a)->a==((stone)*b)->a){
| ^~
main.c:12:29: error: invalid use of void expression
12 | if(((stone*)a)->a==((stone)*b)->a){
| ^... |
s821779128 | p03801 | C++ | #include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cs... | /tmp/ccjbqK8e.o: in function `main':
a.cc:(.text+0x13): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccjbqK8e.o
a.cc:(.text+0xf2): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccjbqK8e.o
a.cc:(.text+0x1cf): relocation trun... |
s264643379 | p03801 | C++ | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
#define rep2(i,a,b) for(int i=(a);i<(b);++i)
#define rrep(i,n) for(int i=(n)-1;i>=0;--i)
#define rrep2(i,a,b) for(int i=(a)-1;i>=b;--i)
// #define range(i,a,b,c) for(int i=a;\... | a.cc: In member function 'bool Mountain_priority_id::operator<(Mountain_priority_id) const':
a.cc:99:9: warning: no return statement in function returning non-void [-Wreturn-type]
99 | }
| ^
a.cc: In function 'void solve()':
a.cc:111:28: warning: narrowing conversion of 'a.std::vector<long long... |
s349751832 | p03801 | C++ | #include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cs... | /tmp/ccson3rM.o: in function `main':
a.cc:(.text+0x13): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccson3rM.o
a.cc:(.text+0xf7): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccson3rM.o
a.cc:(.text+0x1d4): relocation trun... |
s788798800 | p03801 | C++ | #include<bits/stdc++.h>
#define FOR(i,a,b) for(int i = (a);i<=(b);i++)
#define ROF(i,a,b) for(int i = (a);i>=(b);i--)
#define FR(i,a,b) for(int i = (a);i<(b);i++)
#define RF(i,a,b) for(int i = (a);i>(b);i--)
#define MST(a,x) memset(a,x,sizeof(a))
#define ll long long
#define PB push_back
#define PH push
#define MP make... | a.cc: In function 'int main()':
a.cc:89:23: error: expected primary-expression before ';' token
89 | int tot = ;
| ^
|
s467753911 | p03801 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef __int64 LL;
const int maxn = 100000 + 10;
LL t[maxn];
struct point{
int num;
LL x;
bool operator < (const point & rhs) const {
if(x > rhs.x) return true;
else if(x == rhs.x) {
if(num > rhs.num) return true;
else... | a.cc:5:9: error: '__int64' does not name a type; did you mean '__int64_t'?
5 | typedef __int64 LL;
| ^~~~~~~
| __int64_t
a.cc:7:1: error: 'LL' does not name a type
7 | LL t[maxn];
| ^~
a.cc:11:5: error: 'LL' does not name a type
11 | LL x;
| ^~
a.cc: In member ... |
s834669911 | p03801 | C++ | #include <bits/stdc++.h>
#define fs first
#define sc second
#define mp make_pair
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
const int N = 100009;
ii a[N];
ll t[N];
ll ans[N];
int main () {
int n; scanf ("%d", &n);
for (int i = 1; i <= n; i++) {
scanf ("%... | a.cc: In function 'int main()':
a.cc:25:33: error: 'cmp' was not declared in this scope; did you mean 'bcmp'?
25 | sort (a + 1, a + n + 1, cmp);
| ^~~
| bcmp
|
s210045066 | p03802 | C++ | #pragma GCC optimize(3)
#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define ll long long
#define pb emplace_back
#define mkp make_pair
#define rint register int
#define INF ((1 << 30) - 1)
#define FI(n) FastIO::read(n)
#define FO(n) FastIO::write(n)
#define Pair pair < int, int >
#define mst(a,b) memset(a,b,sizeof(... | a.cc: In function 'void printarray(int*, int)':
a.cc:28:44: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
28 | inline void printarray(int *a, int n) {For(i, 1, n) fprintf(stderr, "%d ", a[i]); fprintf(stderr, "\n");}
| ^
a.cc:14:31:... |
s254631992 | p03802 | C++ | #include <bits/stdc++.h>
#include <stdio.h>
#include <iostream>
#include <cstdio>
#include <bitset>
#include <algorithm>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <string>
#include <string.h>
#include <cmath>
#include <utility>
#include <functional>
#include <map>
#include <set>
#incl... | a.cc: In function 'int main()':
a.cc:2589:9: error: reference to 'two_sat' is ambiguous
2589 | two_sat ts(n);
| ^~~~~~~
a.cc:2068:8: note: candidates are: 'struct atcoder::two_sat'
2068 | struct two_sat {
| ^~~~~~~
a.cc:2537:8: note: 'struct two_sat'
2537 | struct t... |
s888301912 | p03802 | C++ | #include <bits/stdc++.h>
#include <stdio.h>
#include <iostream>
#include <cstdio>
#include <bitset>
#include <algorithm>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <string>
#include <string.h>
#include <cmath>
#include <utility>
#include <functional>
#include <map>
#include <set>
#incl... | a.cc:496:5: error: 'internal' does not name a type
496 | internal::scc_graph scc;
| ^~~~~~~~
a.cc: In constructor 'two_sat::two_sat()':
a.cc:470:24: error: class 'two_sat' does not have any field named 'scc'
470 | two_sat() : _n(0), scc(0) {}
| ^~~
a.cc: In constructor... |
s464472705 | p03802 | C++ | #include <bits/stdc++.h>
#include <stdio.h>
#include <iostream>
#include <cstdio>
#include <bitset>
#include <algorithm>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <string>
#include <string.h>
#include <cmath>
#include <utility>
#include <functional>
#include <map>
#include <set>
#incl... | a.cc:29:17: error: 'atcoder' is not a namespace-name
29 | using namespace atcoder;
| ^~~~~~~
a.cc:496:5: error: 'internal' does not name a type
496 | internal::scc_graph scc;
| ^~~~~~~~
a.cc: In constructor 'two_sat::two_sat()':
a.cc:470:24: error: class 'two_sat' does not have ... |
s111626160 | p03802 | C++ | #include <bits/stdc++.h>
#include <stdio.h>
#include <iostream>
#include <cstdio>
#include <bitset>
#include <algorithm>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <string>
#include <string.h>
#include <cmath>
#include <utility>
#include <functional>
#include <map>
#include <set>
#incl... | a.cc:26:10: fatal error: atcoder/all: No such file or directory
26 | #include <atcoder/all>
| ^~~~~~~~~~~~~
compilation terminated.
|
s935864428 | p03802 | C++ | #include <bits/stdc++.h>
#include <stdio.h>
#include <iostream>
#include <cstdio>
#include <bitset>
#include <algorithm>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <string>
#include <string.h>
#include <cmath>
#include <utility>
#include <functional>
#include <map>
#include <set>
#incl... | a.cc:26:10: fatal error: atcoder/all: No such file or directory
26 | #include <atcoder/all>
| ^~~~~~~~~~~~~
compilation terminated.
|
s524322157 | p03802 | C++ | #ifndef ATCODER_INTERNAL_BITOP_HPP
#define ATCODER_INTERNAL_BITOP_HPP 1
#ifdef _MSC_VER
#include <intrin.h>
#endif
namespace atcoder {
namespace internal {
// @param n `0 <= n`
// @return minimum non-negative `x` s.t. `n <= 2**x`
int ceil_pow2(int n) {
int x = 0;
while ((1U << x) < (unsigned int)(n)) x++;
r... | a.cc:1864:10: fatal error: atcoder/all: No such file or directory
1864 | #include <atcoder/all>
| ^~~~~~~~~~~~~
compilation terminated.
|
s578582945 | p03802 | C++ | //Be Name Khoda, Besmellah Rahmane Rahim, In The Name Of God;
//#include<bits/stdc++.h>
#include<iostream>
#include <vector>
#include <algorithm>
#include <cntath>
#include <set>
#include <queue>
#include <deque>
#include <map>
#include <stack>
#include<bitset>
#include<list>
#include<cassert>
#include<numeric>
#includ... | a.cc:6:10: fatal error: cntath: No such file or directory
6 | #include <cntath>
| ^~~~~~~~
compilation terminated.
|
s096404988 | p03802 | C++ | #include <bits/stdc++.h>
using namespace std;
#define N 10005
int n,m,rt,g,cnt,tot,nm,I,tp,x[N][2],y[N][2],id[N*10],he[N*10],ne[N*10],to[N*10],dfn[N*10],low[N*10],sc[N*10],in[N*10],st[N*10];vector<int>s[N*2];
struct nod{int x,d;friend int operator<(nod a,nod b){if(a.x!=b.x) return a.x<b.x;return a.d<b.d;}}t[N*2];
void ... | a.cc: In function 'int Pd(int)':
a.cc:7:52: error: narrowing conversion of '1.0e+9' from 'double' to 'int' [-Wnarrowing]
7 | int Pd(int x){return upper_bound(t+1,t+m+2,(nod){x,1e9})-t;}
| ^~~
a.cc: In function 'int main()':
a.cc:40:60: error: narrowing conver... |
s508525592 | p03802 | C++ | #include <bits/stdc++.h>
using namespace std;
#define N 10005
int n,m,rt,g,cnt,tot,nm,I,tp,x[N][2],y[N][2],id[N*10],he[N*10],ne[N*10],to[N*10],dfn[N*10],low[N*10],sc[N*10],in[N*10],st[N*10];vector<int>s[N*2];
struct nod{int x,d;friend int operator<(nod a,nod b){if(a.x!=b.x) return a.x<b.x;return a.d<b.d;}}t[N*2];
void ... | a.cc: In function 'int Pd(int)':
a.cc:7:52: error: narrowing conversion of '1.0e+9' from 'double' to 'int' [-Wnarrowing]
7 | int Pd(int x){return upper_bound(t+1,t+m+2,(nod){x,1e9})-t;}
| ^~~
a.cc: In function 'int main()':
a.cc:40:60: error: narrowing conver... |
s810339308 | p03802 | C++ | #include <bits/stdc++.h>
#pragma GCC optimize("Ofast");
#define tm hdwusida
using namespace std;
int n;
int dm=0;
int x[10005], y[10005], f[20005];
vector<pair<int, pair<int, int> > > cor;
vector<int> adj[20005];
int low[20005], disc[20005];
bool instack[20005];
int lmao[10005][2];
int tm=0;
stack<int> st;
int find(i... | a.cc:2:30: error: '#pragma GCC optimize' string is badly formed
2 | #pragma GCC optimize("Ofast");
| ^
|
s124228379 | p03802 | C++ | #include<bits/stdc++.h>
using namespace std;
const int N=100005,M=10000005;
int id1[N],id2[N],ne[M],fi[N],zz[M],low[N],dfn[N],l,from[N],tot,flag[N],Stack[N],x[N],y[N],f1[N],f2[N],n,cnt,num;
void jb(int x,int y){
ne[++tot]=fi[x];
fi[x]=tot;
zz[tot]=y;
}
void Tarjan(int x){
low[x]=dfn[x]=++l;
Stack[++tot]=x;
flag[x... | a.cc: In function 'int check(int)':
a.cc:72:19: error: no matching function for call to 'TTree::solve()'
72 | T[0].solve();T[1].solve();
| ~~~~~~~~~~^~
a.cc:47:14: note: candidate: 'void TTree::solve(int)'
47 | void solve(int x){
| ^~~~~
a.cc:47:14: note: candida... |
s127710756 | p03802 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
const int N = 2e4+100;
const int INF = 1e9+1;
inline int read()
{
int x = 0 , f = 1 ; char c = getchar();
while(c < '0' || c > '9') { if(c == '-') f = -f ; c = getchar(); }
while(c >= '0' && c <= '9') x = x... | /tmp/cczN2fu3.o: in function `Tarjan(int)':
a.cc:(.text+0x92): relocation truncated to fit: R_X86_64_PC32 against symbol `tot' defined in .bss section in /tmp/cczN2fu3.o
a.cc:(.text+0x9b): relocation truncated to fit: R_X86_64_PC32 against symbol `tot' defined in .bss section in /tmp/cczN2fu3.o
a.cc:(.text+0xa1): reloc... |
s024145716 | p03802 | C++ | include<bits/stdc++.h>
#define rg register
#define file(x) freopen(x".in","r",stdin);freopen(x".out","w",stdout);
using namespace std;
int read(){
int x=0,f=1;char c=getchar();
while(c<'0'||c>'9') f=(c=='-')?-1:1,c=getchar();
while(c>='0'&&c<='9') x=x*10+c-48,c=getchar();
return f*x;
}
struct node{
int... | a.cc:1:1: error: 'include' does not name a type
1 | include<bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int read()':
a.cc:6:24: error: 'getchar' was not declared in this scope
6 | int x=0,f=1;char c=getchar();
| ^~~~~~~
a.cc:1:1: note: 'getchar' is defined in header '<cstd... |
s648424615 | p03802 | C++ | include<bits/stdc++.h>
#define rg register
#define file(x) freopen(x".in","r",stdin);freopen(x".out","w",stdout);
using namespace std;
int read(){
int x=0,f=1;char c=getchar();
while(c<'0'||c>'9') f=(c=='-')?-1:1,c=getchar();
while(c>='0'&&c<='9') x=x*10+c-48,c=getchar();
return f*x;
}
struct node{
int... | a.cc:1:1: error: 'include' does not name a type
1 | include<bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int read()':
a.cc:6:24: error: 'getchar' was not declared in this scope
6 | int x=0,f=1;char c=getchar();
| ^~~~~~~
a.cc:1:1: note: 'getchar' is defined in header '<cstd... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.