submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s979302761 | p04021 | C++ | #include<bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
#define RALL(A) A.rbegin(),A.rend()
typedef long long LL;
typedef pair<LL,LL> P;
const LL mod=1e9+7;
const LL LINF=1LL<<62;
int main(){
i... | a.cc: In function 'int main()':
a.cc:27:44: error: 'ans' was not declared in this scope; did you mean 'abs'?
27 | for(int i=0;i<N;i++) if(i%2!=ma[A[i]]%2) ans++;
| ^~~
| abs
a.cc:28:11: error: 'ans' was not declared i... |
s463970566 | p04021 | C++ | #include <bits/stdc++.h>
using namespace std;
const int maxn=100000;
struct _node{
int A;
int p;
static cmp(_node &a,_node &b){
return a.A<b.A;
}
};
_node l[maxn+1];
int n;
int main(int argc,char *argv[]){
scanf("%d",&n);
for(int i=1;i<=n;++i){
scanf("%d",&l[i].A);
l[i].p=i;
}
sort(l+1,l+1+n,_node::cmp);
... | a.cc:7:16: error: ISO C++ forbids declaration of 'cmp' with no type [-fpermissive]
7 | static cmp(_node &a,_node &b){
| ^~~
|
s567802270 | p04021 | C++ | #include <bits/stdc++.h>
using namespace std;
const int maxn=100000;
struct _node{
int A;
int p;
static cmp(_node &a,_node &b){
return a.A<b.A;
}
};
_node l[maxn+1];
int n;
int main(int argc,char *argv[]){
//if(argc>=2){freopen(argv[1],"r",stdin);}
//if(argc>=3){freopen(argv[2],"w",stdout);}
scanf("%d",&n);
f... | a.cc:7:16: error: ISO C++ forbids declaration of 'cmp' with no type [-fpermissive]
7 | static cmp(_node &a,_node &b){
| ^~~
|
s316573804 | p04021 | C++ | #include <bits/stdc++.h>
using namespace std;
const int maxn=100000;
struct _node{
int A;
int p;
static cmp(_node &a,_node &b){
return a.A<b.A;
}
};
_node l[maxn+1];
int n;
int main(int argc,char *argv[]){
if(argc>=2){freopen(argv[1],"r",stdin);}
if(argc>=3){freopen(argv[2],"w",stdout);}
scanf("%d",&n);
for(i... | a.cc:7:16: error: ISO C++ forbids declaration of 'cmp' with no type [-fpermissive]
7 | static cmp(_node &a,_node &b){
| ^~~
|
s864979609 | p04021 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <queue>
#include <limits>
#include <map>
#include <stack>
#include <unordered_map>
#define REP(i,n) for(long (i)=0;(i)<(n);(i)++)
#define REPI(i,a,b) for(long (i)=(a);(i)<(b);(i)++)
#define INF numeric_limits<double>:... | a.cc: In member function 'void BIT::init()':
a.cc:25:9: error: 'memset' was not declared in this scope
25 | memset(bit,0,sizeof(bit));
| ^~~~~~
a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
10 | #include <unordered_map>
... |
s745948343 | p04021 | C++ | #include <iostream>
#include <vector>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <queue>
#include <limits>
#include <map>
#include <stack>
#include <unordered_map>
#define REP(i,n) for(long (i)=0;(i)<(n);(i)++)
#define REPI(i,a,b) for(long (i)=(a);(i)<(b);(i)++)
#define INF numeric_limits<double>... | a.cc: In member function 'void BIT::init()':
a.cc:25:9: error: 'memset' was not declared in this scope
25 | memset(bit,0,sizeof(bit));
| ^~~~~~
a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
10 | #include <unordered_map>
... |
s051500218 | p04021 | C++ | #include <iostream>
#include <vector>
#include <cstlib>
#include <algorithm>
#include <cmath>
#include <queue>
#include <limits>
#include <map>
#include <stack>
#include <unordered_map>
#define REP(i,n) for(long (i)=0;(i)<(n);(i)++)
#define REPI(i,a,b) for(long (i)=(a);(i)<(b);(i)++)
#define INF numeric_limits<double>:... | a.cc:3:10: fatal error: cstlib: No such file or directory
3 | #include <cstlib>
| ^~~~~~~~
compilation terminated.
|
s437765654 | p04021 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <queue>
#include <limits>
#include <map>
#include <stack>
#include <unordered_map>
#define REP(i,n) for(long (i)=0;(i)<(n);(i)++)
#define REPI(i,a,b) for(long (i)=(a);(i)<(b);(i)++)
#define INF numeric_limits<double>::infinity()
conste... | a.cc: In member function 'void BIT::init()':
a.cc:24:9: error: 'memset' was not declared in this scope
24 | memset(bit,0,sizeof(bit));
| ^~~~~~
a.cc:10:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
9 | #include <unordered_map>
... |
s853571100 | p04021 | C++ | def minimumOpt1(seq):
dest = {}
b = sorted(seq)
for i in xrange(len(b)):
dest[b[i]] = i
foo = 0
for i in xrange(0, len(seq), 2):
if dest[seq[i]]%2==1:
foo += 1
return foo
def main():
n = int(raw_input().strip())
seq = []
for i in xrange(n):
seq.ap... | a.cc:19:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
19 | if __name__ == '__main__':
| ^~~~~~~~~~
a.cc:1:1: error: 'def' does not name a type
1 | def minimumOpt1(seq):
| ^~~
a.cc:3:5: error: 'b' does not name a type
3 | b = sorted(seq)
... |
s189396754 | p04021 | C++ |
Home
Problem
Status
Contest
User
Group
Forum
Article
Logout
KarlSosa
Begin: 2018-02-21 13:00 EST
Contest 01 Div2
End: 2018-02-28 13:00 EST
70:04:06
Elapsed: 70:04:05
Running
Remaining: 97:55:54
Overview
Problem
Status
Rank (70:04:04)
1 Comments
Previous
... | a.cc:34:5: error: extended character … is not valid in an identifier
34 | …
| ^
a.cc:215:24: error: extended character © is not valid in an identifier
215 | All Copyright Reserved ©2018 Xu Han
| ^
a.cc:217:11: error: "|" is not a valid filename
217 | #12806514 | KarlSos... |
s938219886 | p04021 | C++ | # include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
# define pb push_back
# define fr first
# define sc second
# define mk make_pair
using namespace std;
const long long linf = 1e18 + 7;
const int inf = 1e9 + 7;
const int N = 1e5 + 5;
typedef long long ll;
int n, ans, a[N], x, y;
vector <int> v;
int main(){
... | a.cc: In function 'int main()':
a.cc:32:13: error: 'p' was not declared in this scope
32 | p[a[i]] = i;
| ^
|
s330866108 | p04021 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for(int i = (a), i##_end_ = (b); i <= i##_end_; ++i)
#define drep(i, a, b) for(int i = (a), i##_end_ = (b); i >= i##_end_; --i)
#define clear(a, b) memset((a), (b), sizeof(a))
typedef long long LL;
int read() {
int x = 0, flag = 1;
char ch = getchar();... | a.cc: In function 'int main()':
a.cc:38:40: error: cannot convert 'node' to 'int' in assignment
38 | rep(i, 1, n) b[i] = a[n - i + 1];
| ~~~~~~~~~~~^
| |
| node
a.cc:39:45: error: reque... |
s754152509 | p04021 | C | /*
cat <<EOF >mistaken-paste
*/
#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#define BIG 2000000007
#define VERYBIG 200000000000007LL
#define MOD 1000000007
typedef uint64_t ull;
ty... | main.c: In function 'solve':
main.c:503:9: error: unknown type name 'upque123'
503 | upque123 halfs[2];
| ^~~~~~~~
main.c:506:29: error: request for member 'push' in something not a structure or union
506 | halfs[i % 2].push(a[i]);
| ^
main.c:5... |
s087692231 | p04021 | C++ | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
#include <functional>
#include <map>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <li... | a.cc: In function 'int main()':
a.cc:51:27: error: no match for 'operator+' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'std::pair<long long int, long long int>'} and 'int')
51 | rep(i, n) ... |
s495742767 | p04021 | C++ | #include<iostream>
#include<fstream>
#include<sstream>
#include<algorithm>
#include<cstdio>
#include<cctype>
#include<cassert>
#include<cmath>
#include<ctime>
#include<cstdlib>
#include<cstring>
#include<string>
#include<queue>
#include<vector>
#include<map>
#include<set>
#include<bitset>
#include<stack>
#include<ioman... | a.cc: In function 'int main()':
a.cc:59:13: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
59 | rep(i,1,n){
| ^
a.cc:33:39: note: in definition of macro 'rep'
33 | #define rep(i,st,ed) for(register int i=(st);i<=(ed);++i)
| ... |
s196054698 | p04021 | C++ | N=int(input())
l=[int(input()) for _ in range(N)]
cnt=0
if(N<3):
if N==1:print("0")
elif l[1]>l[2]:print("1")
else:print("0")
for _ in range(N):
for i in range(N-2):
if l[i]>l[i+2]:
l[i], l[i + 2] = l[i + 2], l[i]
for _ in range(N):
for i in range(N-1):
if(l[i]>l[i+1]):
... | a.cc:1:1: error: 'N' does not name a type
1 | N=int(input())
| ^
|
s379402640 | p04021 | Java | import java.io.*;
import java.util.Arrays;
public class Buble {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(in.readLine());
int[] a = new int[(n+1)/2];
int[] b = new int[n/2];
int k = 0;
in... | Main.java:3: error: class Buble is public, should be declared in a file named Buble.java
public class Buble {
^
1 error
|
s531281380 | p04021 | Java | import java.io.*;
import java.util.Arrays;
public class Buble {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(in.readLine());
int[] a = new int[(n+1)/2];
int[] b = new int[n/2];
int k = 0;
in... | Main.java:3: error: class Buble is public, should be declared in a file named Buble.java
public class Buble {
^
1 error
|
s204360490 | p04021 | Java | import java.io.*;
import java.util.Arrays;
public class Buble {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(in.readLine());
int[] a = new int[(n+1)/2];
int[] b = new int[n/2];
int k = 0;
in... | Main.java:3: error: class Buble is public, should be declared in a file named Buble.java
public class Buble {
^
1 error
|
s679995692 | p04021 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class bublesort {
public static void main(String[] args) throws Exception{
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(bf.readLine());
int temp;
int[] nums = new int[N];
for(int i=0... | Main.java:4: error: class bublesort is public, should be declared in a file named bublesort.java
public class bublesort {
^
1 error
|
s467947511 | p04021 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class bublesort {
public static void main(String[] args) throws Exception{
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(bf.readLine());
int temp;
int[] nums = new int[N];
for(int i=0... | Main.java:4: error: class bublesort is public, should be declared in a file named bublesort.java
public class bublesort {
^
1 error
|
s219066674 | p04021 | C++ | #include <stdio.h>
#include <vector>
#include <iostream>
#include <string>
#include <algorithm>
#include <iterator>
#include <map>
using namespace std;
long long int N;
vector <long long int> A;
//vector <long long int> B;
long long int ka;
long long int co=0;
//int dp[1000][1000];//右が1、左が2
map<long long int,long... | a.cc: In function 'int main()':
a.cc:28:14: error: 'B' was not declared in this scope
28 | sort(B.begin(),B.end());
| ^
|
s345437646 | p04021 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int n; cin >> n;
vector<int> odd,even;
for(int i=0; i<n; i++){
int in; scanf("%d",&in);
if(i%2==0)
even.push_back(in);
else
odd.push_back(in);
}
sort(odd.begin(),odd.end()); reverse(odd.begin(),odd.end());
sort(even.beg... | a.cc: In function 'int main()':
a.cc:22:27: error: expected ';' before 'break'
22 | if( odd.size()
| ^
| ;
23 | break;
| ~~~~~
a.cc:22:25: warning: ignoring return value of 'std::vector<_Tp, _Alloc>... |
s251727129 | p04021 | C++ | #define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define INF INT_MAX/3
#define PB push_back
#define MP make_pair
#define ALL(a) (a).begin(),(a).end()
#define SET(a,c) memset(a,c,sizeof a)
... | a.cc: In function 'int main()':
a.cc:58:3: error: 'sort' was not declared in this scope; did you mean 'short'?
58 | sort(B, B + N);
| ^~~~
| short
a.cc:33:50: error: no matching function for call to 'find(int [N], int*, int&)'
33 | #define FIND(ary, length, val) distance(ary, find(ary, ary + len... |
s813945809 | p04021 | C++ | #define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define INF INT_MAX/3
#define PB push_back
#define MP make_pair
#define ALL(a) (a).begin(),(a).end()
#define SET(a,c) memset(a,c,sizeof a)
... | a.cc: In function 'int main()':
a.cc:57:3: error: 'sort' was not declared in this scope; did you mean 'short'?
57 | sort(B, B + N);
| ^~~~
| short
a.cc:33:50: error: no matching function for call to 'find(int [N], int*, int&)'
33 | #define FIND(ary, length, val) distance(ary, find(ary, ary + len... |
s695760434 | p04021 | C++ | #define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define INF INT_MAX/3
#define PB push_back
#define MP make_pair
#define ALL(a) (a).begin(),(a).end()
#define SET(a,c) memset(a,c,sizeof a)
... | a.cc: In function 'int main()':
a.cc:57:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
57 | std::sort(B, B + N);
| ^~~~
| qsort
a.cc:33:50: error: no matching function for call to 'find(int [N], int*, int&)'
33 | #define FIND(ary, length, val) distance(ary, find(ary, ... |
s003358202 | p04021 | C++ | #define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define INF INT_MAX/3
#define PB push_back
#define MP make_pair
#define ALL(a) (a).begin(),(a).end()
#define SET(a,c) memset(a,c,sizeof a)
... | a.cc: In function 'int main()':
a.cc:57:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
57 | std::sort(B, B + N);
| ^~~~
| qsort
a.cc:33:50: error: no matching function for call to 'find(int [N], int*, int&)'
33 | #define FIND(ary, length, val) distance(ary, find(ary, ... |
s296574687 | p04021 | C++ | using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define INF INT_MAX/3
#define PB push_back
#define MP make_pair
#define ALL(a) (a).begin(),(a).end()
#define SET(a,c)... | a.cc: In function 'int main()':
a.cc:58:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
58 | std::sort(B, B + N);
| ^~~~
| qsort
a.cc:35:60: error: no matching function for call to 'find(int [N], int*, int&)'
35 | #define FIND(ary, length, val) std::distance(ary, std::... |
s625038403 | p04021 | C++ | #define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define INF INT_MAX/3
#define PB push_back
#define MP make_pair
#define ALL(a) (a).begin(),(a).end()
#define SET(a,c) memset(a,c,sizeof a)
... | a.cc: In function 'int main()':
a.cc:57:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
57 | std::sort(B, B + N);
| ^~~~
| qsort
a.cc:33:60: error: no matching function for call to 'find(int [N], int*, int&)'
33 | #define FIND(ary, length, val) std::distance(ary, std::... |
s581839815 | p04021 | Java | /* Filename: AGC003C.java
* Author: Mushiyo
*/
import java.util.Scanner;
import java.util.TreeSet;
public class AGC003C {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
while (input.hasNext()) {
int N = input.nextInt();
TreeSet<Integer> even = new TreeSet<Integer>();
... | Main.java:8: error: class AGC003C is public, should be declared in a file named AGC003C.java
public class AGC003C {
^
1 error
|
s939859364 | p04021 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
using namespace std;
int N;
vector<int> L1;
vector<int> L2;
int main() {
int a, b, c;
scanf("%d", &N);
for (int i = 0; i < N/2; i++) {
scanf("%d %d", &a, &b);
L1.push_back(a);
L2.push_back(b);
}
if (N & 1) {
sc... | a.cc: In function 'int main()':
a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'short'?
22 | sort(L1.begin(), L1.end());
| ^~~~
| short
|
s114793547 | p04021 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <cstdio>
#include <cstring>
#include <math.h>
#include <bitset>
#include <time.h>
#include <set>
#define Inf 100000000000ll
#define MAXN 100000
#define MAXX 5
#define ll long long
using namespace std;
int A[MAXN+2];
int main() {
int N;
cin>>N;
... | a.cc: In function 'int main()':
a.cc:30:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
30 | sort(A,A+N);
| ^~~~
| sqrt
|
s547080258 | p04021 | C++ | #include <iostream>
using namespace std;
int main() {
int N;
int a[100000];
int b[100000];
cin >> N;
int t = 0;
for (int j = 0; j < N; ++j) {
cin >> a[j];
b[j] = a[j];
}
sort(a, a + N);
for (int j = 0; j < N; ++j) {
int i = find(a, a + N, b[j]) - a;
... | a.cc: In function 'int main()':
a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'?
15 | sort(a, a + N);
| ^~~~
| short
a.cc:17:21: error: no matching function for call to 'find(int [100000], int*, int&)'
17 | int i = find(a, a + N, b[j]) - a;
| ... |
s614954320 | p04021 | C++ | #include<bits/stdc++.h>
using namespace std;
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
#define mygc(c) (c)=getchar_unlocked()
#define mypc(c) putchar_unlocked(c)
#define ll long long
#define ull unsigned ll
void reader(int *x){int k,m=0;*x=0;for(;;){mygc(k);if(k=='-'){m=1;break;}if('0'<=k&&k<=... | a.cc: In function 'int main()':
a.cc:80:20: error: expected ';' before 'writerLn'
80 | res = (res%3)?1:0
| ^
| ;
81 | writerLn((int)res);
| ~~~~~~~~
|
s120099776 | p04021 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <set>
#include <vector>
using namespace std;
namespace fastinput
{
/** Interface */
inline long long readChar();
template <class T = long long> inline T readInt();
template <class T> inline void writeInt(T x, char end = 0);
... | cc1plus: error: '::main' must return 'int'
|
s188430442 | p04021 | C++ | #include <iostream>
using namespace std;
struct B {
int v;
bool t;
};
B b[100005];
bool comp(B a1, B a2) {
return a1.v < a2.v;
}
int main() {
int N;
cin >> N;
for(int i = 0; i < N; i++) {
cin >> b[i].v;
b[i].t = i%2;
}
sort(b, b+N, comp);
int ans =0;
for(int ... | a.cc: In function 'int main()':
a.cc:23:5: error: 'sort' was not declared in this scope; did you mean 'short'?
23 | sort(b, b+N, comp);
| ^~~~
| short
|
s867551493 | p04021 | C++ | #include <iostream>
#include <cstring>
#include <vector>
#include <cstdio>
#include <string>
#include <cmath>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <ctime>
#include <cstdlib>
#include <bitset>
using namespace std;
typedef long long ll;
typedef double db;
typedef pair<int,int> pii;
t... | a.cc: In function 'int main()':
a.cc:34:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
34 | sort(all(V));
| ^~~~
| sqrt
|
s890968207 | p04021 | C++ | /**
* Created by abhishek on 8/4/2016.
*/
import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int array[] = new... | a.cc:4:1: error: 'import' does not name a type
4 | import java.util.*;
| ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
5 | import java.io.*;
| ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: ... |
s766334879 | p04021 | C++ | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author RiaD
*/
#include <iostream>
#include <fstream>
#include <iostream>
using namespace std;
class Third {
public:
void solve(std::istream& in, std::ostream& out) {
int n;
in >> n;
vector<pair<int, int>> v(n);
f... | a.cc: In member function 'void Third::solve(std::istream&, std::ostream&)':
a.cc:19:17: error: 'vector' was not declared in this scope
19 | vector<pair<int, int>> v(n);
| ^~~~~~
a.cc:9:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#i... |
s606058122 | p04022 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <map>
#include <algorithm>
#include <string>
#include <utility>
#include <set>
#include <stack>
#include <deque>
#include <ctime>
#include <random>
#include <cassert>
#include <cmath>
#include <climits>
#include <queue>
#include <cstring>... | a.cc:92:26: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::vector<std::pair<long long int, long long int> >; _Tp = long long int; _Hash = std::hash<std::vector<std::pair<long long int, long long int> > >; _Pred = std::equal_to<std::vector<std::pair... |
s976623070 | p04022 | C++ | #include <bits/stdc++.h>
#include <omp.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef double ld;
#define int ll
#define rand shittttty_shit
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
mt19937_64 rng_64(chrono::steady_clock::now().time_since_epoch().cou... | a.cc: In function 'll square(ll)':
a.cc:205:13: error: 'get_square' was not declared in this scope; did you mean 'square'?
205 | int u = get_square(v);
| ^~~~~~~~~~
| square
|
s045873676 | p04022 | C++ | #include <bits/stdc++.h>
#include <omp.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef double ld;
#define int ll
#define rand shittttty_shit
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
mt19937_64 rng_64(chrono::steady_clock::now().time_since_epoch().cou... | a.cc: In function 'void smain()':
a.cc:268:23: error: 'cur' was not declared in this scope; did you mean 'cur2'?
268 | for (auto p : cur)
| ^~~
| cur2
a.cc:275:13: error: 'v' was not declared in this scope
275 | if (v == 1 && !SZ(cur2))
|... |
s913081445 | p04022 | C++ | #include <bits/stdc++.h>
#include <omp.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef double ld;
#define int ll
#define rand shittttty_shit
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
mt19937_64 rng_64(chrono::steady_clock::now().time_since_epoch().cou... | a.cc: In function 'void smain()':
a.cc:271:17: error: no match for 'operator[]' (operand types are 'std::map<std::pair<__int128, __int128>, std::pair<long long int, long long int> >' and 'std::map<long long int, long long int>')
271 | flex[cur2]++;
| ^
In file included from /usr/incl... |
s296564053 | p04022 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double lf;
typedef pair<ll,ll> ii;
typedef pair<ii,ll> iii;
#define REP(i,n) for(ll i=0;i<n;i++)
#define REP1(i,n) for(ll i=1;i<=n;i++)
#define RST(i,n) memset(i,n,sizeof i)
#define SZ(a) (ll)a.size()
#define ALL(a) a.begin(),a.end()
#define X ... | a.cc: In function 'int main()':
a.cc:99:26: error: 'cur1' was not declared in this scope
99 | if (d[i] == 1 && cur1 == 1) {
| ^~~~
a.cc:103:17: error: 'cur1' was not declared in this scope
103 | dv[i] = cur1;
| ^~~~
a.cc:104:18: error: 'cur2' was... |
s071054348 | p04022 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long LL;
vector<LL> primes;
const LL CBRT = 2200;
LL cb[CBRT];
const LL LIM = 1e11+5;
void sieve() {
vector<bool> isp(CBRT, 1);
for (LL i=2; i<CBRT; i++)
if (isp[i]) {
primes.push_back(i);
for (LL j=2*i; j<CBRT; j+=i)
... | a.cc: In function 'int main()':
a.cc:70:35: error: no matching function for call to 'min(int, std::map<long long int, long long int>::mapped_type)'
70 | if (a == b) ans += min(1, cnt[a]+cnt[b]);
| ~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorit... |
s275288665 | p04022 | Java | import java.util.*;
import java.io.*;
import java.text.*;
class Main{
//SOLUTION BEGIN
void pre() throws Exception{}
void solve(int TC) throws Exception{
int N = ni();
int mx = (int)1e5+2;
boolean[] sieve = new boolean[mx];
int[] list = new int[mx];
long[] sqpr = new... | Main.java:52: error: ')' expected
if(ind == -1{
^
1 error
|
s599777680 | p04022 | C++ | #pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,abm,mmx,avx,avx2,tune=native")
#include<bits/stdc++.h>
#pragma GCC optimize(3)
#define ll long long
#define int long long
#define ljc 998... | In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:6:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::_Rb_tree<long long int, std::pair<const long long... |
s253095297 | p04022 | C++ | #pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,abm,mmx,avx,avx2,tune=native")#include<bits/stdc++.h>
#pragma GCC optimize(3)
#define ll long long
#define int long long
#define ljc 9982... | a.cc:5:97: error: stray '#' in program
5 | #pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,abm,mmx,avx,avx2,tune=native")#include<bits/stdc++.h>
| ^
a.cc:5:98: error: '#pragma GCC target' string i... |
s525287330 | p04022 | C++ | #include <bits/stdc++.h>
using namespace std;
#define vist fuckitwholefamily
#define int long long
#define MAXN 100005
#define Int int
int n,ans,s[MAXN];
map <int,int> tot;
map <int,bool> vis;
template <typename T> inline void read (T &t){t = 0;char c = getchar();int f = 1;while (c < '0' || c > '9'){if (c == '-') f ... | a.cc: In function 'void Euler(long long int)':
a.cc:21:22: error: reference to 'visit' is ambiguous
21 | if (!visit[i]) prime[++ cnt] = i;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
from a.cc:1:
/usr/include/c++/14/... |
s790990655 | p04022 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define MAXN 100005
#define Int int
int n,ans,s[MAXN];
map <int,int> tot;
map <int,bool> vis;
template <typename T> inline void read (T &t){t = 0;char c = getchar();int f = 1;while (c < '0' || c > '9'){if (c == '-') f = -f;c = getchar();}while (c >=... | a.cc: In function 'void Euler(long long int)':
a.cc:20:22: error: reference to 'visit' is ambiguous
20 | if (!visit[i]) prime[++ cnt] = i;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
from a.cc:1:
/usr/include/c++/14/... |
s994661969 | p04022 | C++ | #include <bits/stdc++.h>
using namespace std;
#define Int register int
#define int long long
#define MAXN 100005
int n,ans,s[MAXN];
map <int,int> tot;
map <int,bool> vis;
template <typename T> inline void read (T &t){t = 0;char c = getchar();int f = 1;while (c < '0' || c > '9'){if (c == '-') f = -f;c = getchar();}wh... | a.cc: In function 'void Euler(long long int)':
a.cc:19:18: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
19 | for (Int i = 2;i <= up;++ i){
| ^
a.cc:20:22: error: reference to 'visit' is ambiguous
20 | if (!visit[i]) prime[++ cnt] ... |
s674132849 | p04022 | C++ | /*
Arthor : Ender_zzm
E-mail zzm_ender_wiggin@outlook.com
Blog ender-zzm.enbar.cn
*/
#include <bits/stdc++.h>
#include<tr1/unordered_map>
using namespace std;
inline int Isdigit(char c) {
if (c < '0' || c > '9') return 0;
return 1;
}
inline int readint(){
register int x = 0, flag = 1;
register char ch;
w... | a.cc: In function 'int readint()':
a.cc:15:18: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
15 | register int x = 0, flag = 1;
| ^
a.cc:15:25: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
15 | register int x =... |
s858481754 | p04022 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll ;
const ll mk = 100055;
const ll logn = 29;
const ll mod = 1e9 + 7;
#define endl "\n"
#define IOS ios::sync_with_stdio(0); cin.tie(0);
#define fi first
#define se second
#define pii pair<ll,ll>
#define pq priority_queue
#define UwU uwu... | a.cc: In function 'std::pair<long long int, long long int> root(ll)':
a.cc:61:40: error: expected ';' before ')' token
61 | for(int j = 0 ; j < 3 - num) reverse_val *= i;
| ^
| ;
|
s689067179 | p04022 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll ;
const ll mk = 100055;
const ll logn = 29;
const ll mod = 1e9 + 7;
#define endl "\n"
#define IOS ios::sync_with_stdio(0); cin.tie(0);
#define fi first
#define se second
#define pii pair<ll,ll>
#define pq priority_queue
#define UwU uwu... | a.cc: In function 'std::pair<long long int, long long int> root(ll)':
a.cc:61:40: error: expected ';' before ')' token
61 | for(int j = 0 ; j < 3 - num) reverse_val *= i;
| ^
| ;
a.cc:66:9: error: 'num' was not decl... |
s003128947 | p04022 | C++ | //khodaya khodet komak kon
#include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define all(x) x.begin(), x.end()
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
const int... | a.cc: In function 'int32_t main()':
a.cc:77:19: error: no matching function for call to 'min(std::map<long long int, int>::mapped_type&, long long int)'
77 | ans += min(cnt[1], 1ll);
| ~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/inc... |
s552381232 | p04022 | C++ | //khodaya khodet komak kon
#include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define all(x) x.begin(), x.end()
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#define int long long
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef vect... | a.cc: In function 'int32_t main()':
a.cc:83:19: error: no matching function for call to 'min(std::map<long long int, long long int>::mapped_type&, int)'
83 | ans += min(cnt[1], 1);
| ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include... |
s941401755 | p04022 | Java | import static java.lang.Math.abs;
import static java.lang.Math.max;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map.Entry;
import java.util.NoSuchElementException;
import java.util.Prim... | Main.java:20: error: package lib.math.base does not exist
import lib.math.base.MathUtil;
^
Main.java:138: error: cannot find symbol
d = MathUtil.gcd(abs(x - y), n);
^
symbol: variable MathUtil
location: class Main
2 errors
|
s889745216 | p04022 | Java | import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map.Entry;
import java.util.NoSuchElementException;
import java.util.function.IntUnaryOperator;
import java.util.function.LongUnaryOperator;
import lib.util.collectio... | Main.java:11: error: package lib.util.collections does not exist
import lib.util.collections.IntArrayList;
^
Main.java:74: error: cannot find symbol
public static IntArrayList eratosthenes(final int n, final int[] div) {
^
symbol: class IntArrayList
location: class... |
s079165711 | p04022 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(long long i=0;i<(long long)(n);i++)
#define REP(i,k,n) for(long long i=k;i<(long long)(n);i++)
#define all(a) a.begin(),a.end()
#define pb emplace_back
#define eb emplace_back
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
#define ub(v,k) (upper_bo... | a.cc: In function 'vp bunkai(ll)':
a.cc:71:14: error: 't' was not declared in this scope
71 | for(ll i:t){
| ^
a.cc: In function 'int main()':
a.cc:85:6: warning: ignoring return value of 'bool std::operator==(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&) [with _Tp = long long int; _... |
s371581143 | p04022 | C++ | #include <cstdio>
#include <algorithm>
#include <map>
#include <vector>
#define LL long long
const int maxn = 1e5 + 5;
const int maxP = 1e4;
using namespace std;
LL a[maxn], b[maxn]; int n;
map <LL, int> m;
vector <LL> p;
bool f[maxn];
void install(){
for (int i = 2; i <= maxP; i++){
if (!f[i]) p.push_back(i);
for... | a.cc: In function 'long long int split(long long int&)':
a.cc:33:25: error: 'sqrt' was not declared in this scope
33 | if ((LL)sqrt(x) * (LL)sqrt(x) == x) res1 *= x, res2 *= (LL)sqrt(x);
| ^~~~
|
s608980565 | p04022 | C++ | #include <iostream>
#include <algorithm>
#include <utility>
#include <vector>
#include <map>
template <class T, class U>
inline bool chmin(T& lhs, const U& rhs) {
if (lhs > rhs) {
lhs = rhs;
return true;
}
return false;
}
template <class T, class U>
inline bool chmax(T& lhs, const U& rhs) {
if (lhs < ... | a.cc: In function 'int main()':
a.cc:66:8: error: 'unordered_map' is not a member of 'std'
66 | std::unordered_map<lint, int> count;
| ^~~~~~~~~~~~~
a.cc:6:1: note: 'std::unordered_map' is defined in header '<unordered_map>'; this is probably fixable by adding '#include <unordered_map>'
5 | #inclu... |
s072885781 | p04022 | C++ | #include<bits/stdc++.h>
//ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<pii,int> ppii;
typedef pair<int,pii> pipi;
typedef pair<ll,ll> pll;
typedef pair<pll,ll> ppll;
typedef pair<ll,pll> plpl;
typed... | a.cc: In function 'int main()':
a.cc:125:8: error: expected primary-expression before '/' token
125 | / cout<<vv[i].first<<" "<<vv[i].second<<endl;
| ^
|
s382519942 | p04022 | C++ | #include <bits/stdc++.h>
#define BIT(n) (1LL << (n))
#define BITF(n, i) (((n) >> i) & 1)
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPB(i, n) for (int i = 0; i < BIT(n); i++)
#define REPS(i, x) for (int i = 1; i <= x; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define REPZ(i, x) for (int i = 0; i ... | a.cc: In function 'int main()':
a.cc:166:17: error: request for member 'size' in 'pList', which is of non-class type 'long long int [2501]'
166 | sizeP = pList.size();
| ^~~~
|
s023922743 | p04022 | C++ |
#include<bits/stdc++.h>
using namespace std;
#define inf INT_MAX
#define INF LLONG_MAX
#define ll long long
#define ull unsigned long long
#define M (int)(1e9+7)
#define P pair<int,int>
#define PLL pair<ll,ll>
#define FOR(i,m,n) for(int i=(int)m;i<(int)n;i++)
#define RFOR(i,m,n) for(int i=(int)m;i>=(int)n;i--)
#define... | a.cc: In function 'int main()':
a.cc:100:8: error: 'is_squre' was not declared in this scope
100 | if(is_squre(s)){
| ^~~~~~~~
|
s589795617 | p04022 | C++ | #define _USE_MATH_DEFINES
#include<iostream>
#include<vector>
#include<set>
#include<queue>
#include<map>
#include<algorithm>
#include<cstring>
#include<string>
#include<cassert>
#include<cmath>
#include<climits>
#include<iomanip>
#include<stack>
#include<unordered_map>
#include<bitset>
using namespace std;
#define rep... | a.cc: In function 'int main()':
a.cc:36:49: error: 's' was not declared in this scope
36 | for (int j = i * 2; j < s; j += i)isPrime[j] = 0;
| ^
|
s005867986 | p04022 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<set>
#include<queue>
#include<stack>
#include<bitset>
#include<functional>
#include<map>
#include<unordered_set>
using namespace std;
long long p = 998244353;
//long long p = 1000000007;
#define int long long
#define vel vector<long long... | a.cc: In function 'long long int reve(long long int, std::vector<long long int>&)':
a.cc:74:25: error: 'sqrt' was not declared in this scope
74 | int m = sqrt(n);
| ^~~~
|
s012293464 | p04022 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<set>
#include<queue>
#include<stack>
#include<bitset>
#include<functional>
#include<map>
#include<unordered_set>
using namespace std;
long long p = 998244353;
//long long p = 1000000007;
#define int long long
#define vel vector<long long... | a.cc: In function 'long long int reve(long long int, std::vector<long long int>&)':
a.cc:74:25: error: 'sqrt' was not declared in this scope
74 | int m = sqrt(n);
| ^~~~
|
s568192034 | p04022 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<set>
#include<queue>
#include<stack>
#include<bitset>
#include<functional>
#include<map>
#include<unordered_set>
using namespace std;
long long p = 998244353;
//long long p = 1000000007;
#define int long long
#define vel vector<long long... | a.cc: In function 'long long int reve(long long int, std::vector<long long int>&)':
a.cc:75:25: error: 'sqrt' was not declared in this scope
75 | int m = sqrt(qn);
| ^~~~
|
s416827501 | p04022 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<set>
#include<queue>
#include<stack>
#include<bitset>
#include<functional>
#include<map>
#include<unordered_set>
using namespace std;
long long p = 998244353;
//long long p = 1000000007;
#define int long long
#define vel vector<long long... | a.cc: In function 'long long int reve(long long int, std::vector<long long int>&)':
a.cc:74:25: error: 'sqrt' was not declared in this scope
74 | int m = sqrt(n);
| ^~~~
|
s654794465 | p04022 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
const long long mod = 998244353;
const long long inf = 1ll << 61;
const double eps = 0.000000000001;
const long long A = 1000000000;
typedef pair<int, int> P;
typedef pair<P, int>PP;
struct edge { int to; int cost; ... | a.cc: In member function 'bool Miller::check(long long int)':
a.cc:42:25: error: 'rue' was not declared in this scope
42 | bool ok=rue;
| ^~~
|
s265439304 | p04022 | C++ | #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <fstream>
#include <cassert>
#include <cstring>
#include <unordered_set>
#include <unordered_map>
#include <numeric>
#include <ctime>... | a.cc:26:7: error: 'll' does not name a type
26 | const ll INF = 1e10 + 239;
| ^~
a.cc:43:1: error: 'll' does not name a type
43 | ll no_cubic(ll x) {
| ^~
a.cc:52:1: error: 'll' does not name a type
52 | ll get_pair(ll x) {
| ^~
a.cc: In function 'int main()':
a.cc:79:9: error: 'll' was... |
s655455029 | p04022 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int (i) = 0; (i) < (n); (i)++)
#define reps(i, n) for (int (i) = 1; (i) <= (n); (i)++)
typedef vector<int> vint;
typedef pair<int, int> pint;
const double PI = 3.141592653589793238462643383279;
const int DY[8] = {0, 1, 0, -1, 1, ... | a.cc: In function 'int main()':
a.cc:54:17: error: 'prod' was not declared in this scope
54 | prod(counter, j * j);
| ^~~~
|
s647764751 | p04022 | C++ | #include <bits/stdc++.h>
#define ft first
#define sd second
using namespace std;
typedef long long ll;
const int MAXN = 100 * 1000 + 12;
unordered_map<ll, int> mp;
bool inp[MAXN];
vector<int> p;
void gh() {
inp[0] = inp[1] = true;
for (int i = 2; i < MAXN; i++)
if (!inp[i]) {
p.push_back(i);
for (ll... | a.cc: In function 'int main()':
a.cc:72:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
72 | ans++;
| ^~~
| abs
a.cc:77:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
77 | ... |
s862026158 | p04022 | C++ | #include <bits/stdc++.h>
#define int long long
//#pragma GCC optimize ("O3")
#define map unordered_map
using namespace std;
int m3[2160];
int m2[2160];
int n;
int cnt[100005];
int it=0;
int b[100005];
int a[100005];
map<int, int> concac;
map<int, int> used;
signed main()
{
ios::sync_with_stdio(false);
for(int i=1; ... | a.cc: In function 'int main()':
a.cc:96:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
96 | cout<<ans;
| ^~~
| abs
|
s942764112 | p04022 | C++ | #include<bits/stdc++.h>
using namespace std;
#define IL inline
#define rep(i,j,k) for(int i=j;i<=k;++i)
#define repd(i,j,k) for(int i=j;i>=k;--i)
#define pb push_back
#define db double
#define mp make_pair
#define mp3(a,b,c) mp(mp(a,b),c)
#define pii pair<int,int>
#define piii pair<pii,int>
#define fr first
#define se ... | a.cc: In function 'bool Rho::Miller_Rabin(long long int)':
a.cc:45:21: error: 'nn' was not declared in this scope; did you mean 'n'?
45 | if((nn%6)!=1 && (nn%6)!=5) return false;
| ^~
| n
a.cc: At global scope:
a.cc:78:15: warning: overflow in conve... |
s475831515 | p04022 | C++ | #include<bits/stdc++.h>
using namespace std;
#define IL inline
#define rep(i,j,k) for(int i=j;i<=k;++i)
#define repd(i,j,k) for(int i=j;i>=k;--i)
#define pb push_back
#define db double
#define mp make_pair
#define mp3(a,b,c) mp(mp(a,b),c)
#define pii pair<int,int>
#define piii pair<pii,int>
#define fr first
#define se ... | a.cc: In function 'long long int mul(long long int, long long int)':
a.cc:22:39: error: invalid type argument of unary '*' (have 'long long int')
22 | IL ll mul(ll x,ll y){return (__int128)*x*y%mod;}
| ^~
|
s056709423 | p04022 | C++ | //fold
#ifndef KHALIL
#include <bits/stdc++.h>
#else
#include "header.h"
#endif
#define endl '\n'
#define mp make_pair
#define tostr(x) static_cast<ostringstream&>((ostringstream()<<dec<<x)).str()
#define rep(i,begin,end) for(auto i = begin;i < end;i++)
#define repr(i,begin,end) for(auto i = begin-1;i >= end;i--)
#defi... | a.cc: In function 'int main()':
a.cc:89:17: error: 'i' was not declared in this scope
89 | i = el.first;
| ^
|
s974609851 | p04022 | C++ | #include <map>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
#define ll long long
map <ll ,int > ma;
const int M=3005,N=100005;
int p[M],tot=0;bool notp[M];
ll a[N];ll c1[N],c2[N];
int cnt[N];
map <ll,bool > used;
inline void getp(){
for (int i=2;i<=3000;i++){
if ... | a.cc: In function 'int main()':
a.cc:39:34: error: 'sqrt' was not declared in this scope
39 | ll t=(ll)sqrt(a[i]);
| ^~~~
|
s098875097 | p04022 | C++ | #include <map>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
#define ll long long
map <ll ,int > ma;
const int M=3005,N=100005;
int p[M],tot=0;bool notp[M];
ll a[N];ll c1[N],c2[N];
int cnt[N];
inline void getp(){
for (int i=2;i<=3000;i++){
if (!notp[i]) p[++tot]=i... | a.cc: In function 'int main()':
a.cc:38:36: error: 'sqrt' was not declared in this scope
38 | int t=(int)sqrt(a[i]);
| ^~~~
|
s010840097 | p04022 | C++ | #include <map>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
#define ll long long
map <ll ,int > ma;
const int M=3005,N=100005;
int p[M],tot=0;bool notp[M];
ll a[N];ll c1[N],c2[N];
int cnt[N];
inline void getp(){
for (int i=2;i<=3000;i++){
if (!notp[i]) p[++tot]=i... | a.cc: In function 'int main()':
a.cc:38:36: error: 'sqrt' was not declared in this scope
38 | int t=(int)sqrt(a[i]);
| ^~~~
|
s353486149 | p04022 | C++ | // warm heart, wagging tail,and a smile just for you!
// ███████████
// ███╬╬╬╬╬╬╬╬╬╬███
// ███╬╬╬╬╬████╬╬╬╬╬╬███
// ... | a.cc: In function 'int main()':
a.cc:103:20: error: request for member 'size' in 'tmp', which is of non-class type 'long long int'
103 | if(id == tmp.size()) break;
| ^~~~
|
s891892373 | p04022 | C++ | #include<bits/stdc++.h>
#define ll long long
using namespace std;
ll p[10000],a[100005],k[100005];
int cnt=0;
map<ll,int>x;
map<ll,bool>vis;
ll M(ll t,ll h)
{
ll ans1=1,ans2=1;
for(int i=0;i<cnt&&p[i]*p[i]<=t;i++)
{
int cot=0;
while(t%p[i]==0) cot++,t/=p[i];
cot%=3;
if(cot==0... | a.cc: In function 'long long int M(long long int, long long int)':
a.cc:32:24: error: expected ';' before 'if'
32 | ans1*=t,ans2*=t
| ^
| ;
33 | if(ans>1e10) ans2=0;
| ~~
a.cc:34:14: error: invalid type argument ... |
s083027409 | p04022 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cassert>
#include<map>
#define ll long long
using namespace std;
inline ll read(){
ll re=0,flag=1;char ch=getchar();
while(!isdigit(ch)){
if(ch=='-') flag=-1;
ch=getchar();
}
while(isdigit(ch)) re=(re<<1)+(re<<3)+ch-'0',ch=getcha... | a.cc:32:1: error: 'vector' does not name a type
32 | vector<ll>f1,f2;bool cb=0;
| ^~~~~~
a.cc: In function 'void F(long long int, long long int)':
a.cc:38:9: error: 'f1' was not declared in this scope
38 | f1.clear();f2.clear();
| ^~
a.cc:38:20: error: 'f2' was not declared in this sco... |
s688987408 | p04022 | C++ | #include <cstdio>
#include <algorithm>
#include <map>
const int N=1e5+5,P=2200+5;
int n,tot,p[P];
long long a[N],s[N],t[N];
bool flg[P];
std::map<long long,int> mp;
void init() {
for(int i=2;i<P;++i) {
if(!flg[i]) p[++tot]=i;
for(int j=1;j<=tot&&i*p[j]<P;++j) {
flg[i*p[j]]=1;
if(i%p[j]==0) break;
}
}
}
v... | a.cc: In function 'void solve()':
a.cc:36:35: error: 'sqrt' is not a member of 'std'; did you mean 'sort'?
36 | long long rt=std::sqrt(x);
| ^~~~
| sort
|
s731423821 | p04022 | C++ | #include <bits/stdc++.h>
using namespace std;
namespace IO
{
const int __S=(1<<20)+5;char __buf[__S],*__H,*__T;
inline char getc()
{
if(__H==__T) __T=(__H=__buf)+fread(__buf,1,__S,stdin);
if(__H==__T) return -1;return *__H++;
}
template <class __I>inline void read(__I &__x)
{
... | a.cc: In function 'int main()':
a.cc:83:42: error: conversion from 'std::unordered_map<long long int, long long int>::iterator' {aka 'std::__detail::_Insert_base<long long int, std::pair<const long long int, long long int>, std::allocator<std::pair<const long long int, long long int> >, std::__detail::_Select1st, std::... |
s762827716 | p04022 | C++ | #include <bits/stdc++.h>
using namespace std;
namespace IO
{
const int __S=(1<<20)+5;char __buf[__S],*__H,*__T;
inline char getc()
{
if(__H==__T) __T=(__H=__buf)+fread(__buf,1,__S,stdin);
if(__H==__T) return -1;return *__H++;
}
template <class __I>inline void read(__I &__x)
{
... | a.cc: In function 'int main()':
a.cc:83:43: error: conversion from '_Rb_tree_iterator<pair<[...],long long int>>' to non-scalar type '_Rb_tree_iterator<pair<[...],int>>' requested
83 | for(map<ll,int>::iterator it=cnt.begin();it!=cnt.end();++it)
| ~~~~~~~~~^~
a.cc:83:48: er... |
s068297128 | p04022 | C++ | #include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG_MODE
#define DBG(n) n;
#else
#define DBG(n) ;
#endif
#define REP(i,n) for(ll (i) = (0);(i) < (n);++i)
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v,n) {for(int W = 0;W < (n);W++)cerr << v[W] << ' ';cerr << end... | a.cc: In function 'int main()':
a.cc:62:30: error: 'S' was not declared in this scope
62 | if(ref * s * S > 1e11){
| ^
|
s385588793 | p04022 | C++ | #include <bits/stdc++.h>
using namespace std;
int n;
long long a[100005];
bool ex = false;
multiset<long long> s, ss;
map<long long, int> f;
int spf[100005];
const int MAXN = 100001;
void sieve() {
spf[1] = 1;
for (int i=2; i<=100000; i++)
spf[i] = i;
for (int i=4; i<MAXN; i+=2)
spf[i] = ... | a.cc: In function 'int main()':
a.cc:76:17: error: 'else' without a previous 'if'
76 | else {
| ^~~~
|
s512800516 | p04022 | C++ | #include<bits/stdc++.h>
const int N = 1e5 + 5;
using namespace std;
int n, ans;
long long a[N];
long long cal(long long x){
long long ans = 1;
for (long long i = 2; i * i <= x; i++){
if (x % i != 0) continue;
if (x % (i * i) == 0) ans *= i, x /= i * i;
else ans *= i * i, x /= i;
}
... | a.cc: In function 'int main()':
a.cc:28:9: error: 'mymap' was not declared in this scope
28 | mymap[a[i]]++;
| ^~~~~
a.cc:31:13: error: 'mymap' was not declared in this scope
31 | if (mymap[a[i]] == 0) continue;
| ^~~~~
a.cc:32:32: error: 'mymap' was not declared in... |
s618412229 | p04022 | Java | import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;
class Main{
static void solve(){
int n = ni();
long[] s = nla(n);
boolean[] isPrime = new boolean[100001];
Arrays.fill(isPrime, true);
for(int i=2;i<=100000;++i){
if(!isPrime[i])continue;
for(i... | Main.java:46: error: cannot find symbol
if(sqrSet.containsKey(s[i]))rev*=sqrMap.get(s[i]);
^
symbol: variable sqrSet
location: class Main
1 error
|
s437307522 | p04022 | C++ | #include <stdio.h>
#include <bits/stdc++.h>
#define pb push_back
#define pf push_front
#define pp pop_back
#define sz(a) (int)(a.size())
#define mp make_pair
#define F first
#define S second
#define next _next
#define prev _prev
#define left _left
#define right _right
#define y1 _y1
#define all(x) x.begin(), x.end... | a.cc:50:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
50 | main() {
| ^~~~
a.cc: In function 'int main()':
a.cc:103:28: error: no match for 'operator!=' (operand types are 'std::map<long long int, std::set<long long int> >::mapped_type' {aka 'std::set<long long int>'} and 'long... |
s559531146 | p04022 | C++ | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <queue>
#include <map>
#include <ctime>
#include <unordered_map>
using namespace std;
typedef long long ll;
const int maxn=150000;
const ll MOD=1e9+7;
ll prime[maxn],tot;
bool isprime[maxn];
void get_prime(){
memset... | a.cc:32:24: error: conflicting declaration 'std::unordered_map<long long int, bool> rvs'
32 | unordered_map<ll,bool> rvs;
| ^~~
a.cc:31:22: note: previous declaration as 'std::unordered_map<long long int, long long int> rvs'
31 | unordered_map<ll,ll> rvs;
| ... |
s100419812 | p04022 | C++ | #include<bits/stdc++.h>
#define debug puts("&&&&&&&&")
#define read(x) scanf("%lld",&x)
using namespace std;
typedef long long LL;
const int maxn=1e5+5;
const int maxx=1e10+2;
LL a[maxn];
LL b[maxn];
LL n;
map<LL,int>ma;
LL sqr(LL a) {
return a*a;
}
int main() {
while(read(n) != EOF) {
ma.clear();
... | a.cc:7:20: warning: overflow in conversion from 'double' to 'int' changes value from '1.0000000002e+10' to '2147483647' [-Woverflow]
7 | const int maxx=1e10+2;
| ~~~~^~
a.cc: In function 'int main()':
a.cc:42:38: error: 'y' was not declared in this scope
42 | if (sqr((LL)sqrt(t))... |
s387517654 | p04022 | C++ | #include <iostream>
#include <map>
#include <algorithm>
using namespace std;
long long n;
long long a[(1<<20)], f[(1<<20)];
vector < long long > prs;
pair < long long, long long > vals[(1<<20)];
map < long long, long long > cnt;
pair< long long, long long > gg ( long long x ) {
long long a = 1, b = 1;
for (... | a.cc:8:1: error: 'vector' does not name a type
8 | vector < long long > prs;
| ^~~~~~
a.cc: In function 'std::pair<long long int, long long int> gg(long long int)':
a.cc:16:23: error: 'prs' was not declared in this scope
16 | for ( int i = 0 ; prs[i]*prs[i] <= x ; i ++ ) {
| ... |
s462103071 | p04022 | C++ | #include <bits/stdc++.h>
using namespace std;
int n;
vector<__int128_t> s, t;
void init() {
map<__int128_t, __int128_t> mp;
vector<int> prime;
bool f[101010];
memset(f, true, sizeof f);
f[0] = f[1] = false;
for (int i = 2; i <= 100000; ++i) {
if (f[i]) {
if (i < 2200) prime.push_back(i);
... | a.cc: In function 'void init()':
a.cc:26:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__int128')
26 | cin >> m;
| ~~~ ^~ ~
| | |
| | __int128
| std::istream {aka std::basic_istream<char>}
In file incl... |
s100939553 | p04022 | C++ | #include <iostream>
#include <cstdio>
#include <cassert>
#include <cstring>
#include <vector>
#include <valarray>
#include <array>
#include <queue>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <cmath>
#include <complex>
#include <random>
using namespace... | a.cc: In lambda function:
a.cc:85:55: error: 'n' is not captured
85 | auto f = [](ll x){ return (__int128_t(x)*x + 1) % n; };
| ^
a.cc:85:15: note: the lambda has no capture-default
85 | auto f = [](ll x){ return (__int128_t(x)*x + 1) % n; };
... |
s708166434 | p04022 | C++ | #include <iostream>
#include <cstdio>
#include <cassert>
#include <cstring>
#include <vector>
#include <valarray>
#include <array>
#include <queue>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <cmath>
#include <complex>
#include <random>
using namespace... | a.cc: In function 'uint64_t SQUFOF(uint64_t)':
a.cc:190:27: error: 'n' was not declared in this scope
190 | return pollard_single(n);
| ^
|
s198932609 | p04022 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int lint;
map <lint, int> Map;
int main()
{
ios_base :: sync_with_stdio(false);
int N;
cin >> N;
while (N --) {
lint nr;
cin >> nr;
for (int i = 2200; i; -- i) {
const lint cube = (1LL * i * i * i);
... | a.cc: In function 'int main()':
a.cc:42:27: error: 'minim' was not declared in this scope; did you mean 'minimum'?
42 | if (Map.count(minim))
| ^~~~~
| minimum
|
s112708782 | p04022 | C++ | #include <cstdio>
#include <algorithm>
#include <unordered_map>
using namespace std;
#define iter(i, n) for (int i = 1; i <= n; ++i)
#define forw(i, a, b) for (int i = a; i <= b; ++i)
typedef long long i64;
unordered_map<i64, int> mp;
unordered_map<i64, i64> inv;
#define fi first
#define se second
const int N = 22... | a.cc: In function 'int main()':
a.cc:48:33: error: 'sqrt' was not declared in this scope
48 | i64 q = sqrt(a);
| ^~~~
a.cc:51:37: error: 'log' was not declared in this scope; did you mean 'long'?
51 | if (log(v) + log(a)... |
s566830032 | p04022 | C++ | #include<bits/stdc++.h>
using namespace std;
const int mod=1e9+7;
const int maxn=2160;
bool flag[maxn];
int pri[maxn],t;
void pre()
{
memset(flag,0,sizeof(flag));
t=0;
for(int i=2;i<maxn;i++)
{
if(!flag[i]){
pri[t++]=i;
}
for(int j=0;j<t&&i*pri[j]<maxn;j++)
{
... | a.cc: In function 'int main()':
a.cc:106:25: error: 'M' was not declared in this scope
106 | if (iter == M.end())
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.