submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s926441425 | p03767 | C++ | 10
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 100000000... | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 10
| ^~
|
s392007084 | p03767 | C++ | #include <bits/stdc++.h>
using namespace std;
/* REPmacro */
#define REP(i,n) for(int i=0,i##_len=(n);i<i##_len;++i)
#define REPR(i,n) for(int i=((int)(n)-1);i>=0;--i)
#define FOR(i,m,n) for(int i=(int)(m);i<(int)(n);++i)
/*alias*/
#define ALL(x) (x).begin(),(x).end()
#define SZ(x) ((int)(x).size())
#define F first
#... | a.cc: In function 'int main()':
a.cc:71:3: error: declaration of 'auto f' has no initializer
71 | auto f,m,e;
| ^~~~
a.cc:71:3: error: declaration of 'auto m' has no initializer
a.cc:71:3: error: declaration of 'auto e' has no initializer
a.cc:79:18: error: no matching function for call to 'get<0>(std::vec... |
s256276045 | p03767 | Java | import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class A012 {
public static void Main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scanner = new Scanner(System.in);
int N = scanner.nextInt();
ArrayList<Long> list = new ArrayList<>();
for(int i = 0; i < 3 * N;... | Main.java:5: error: class A012 is public, should be declared in a file named A012.java
public class A012 {
^
1 error
|
s828087327 | p03767 | C++ | #include <bits/stdc++.h>
#include <math.h>
#include <string>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> data(3 * N - 1);
long counter = 0;
for(int i = 0;i < 3*N;i++){
cin >> data[i];
}
sort(str.begin(),str.end());
for(int i = N;i < 2 * N - 1;i++){
counter += data[i];
}... | a.cc: In function 'int main()':
a.cc:17:8: error: 'str' was not declared in this scope; did you mean 'std'?
17 | sort(str.begin(),str.end());
| ^~~
| std
|
s450370142 | p03767 | C++ | #include <iostream>
#include <algorithm>
typedef long long ll;
int main(){
int n;
cin >> n;
int k=3*n;
ll a[k];
for(int i=0;i<k;i++){
cin >> a[i];
}
sort(a,a+k);
ll ans=0;
for(int i=n;i<k;i+=2){
ans+=a[i];
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin >> n;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to sta... |
s312926466 | p03767 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main() {
__int64 N, a[100000], count = 0;
cin >> N;
for (int i = 0; i < 3 * N; i++) {
cin >> a[i];
}
sort(a, a + 3 * N, greater<int>());
for (int i = 0; i < N; i++) {
count += a[i * 2 + 1];
}
cout << count << endl;
} | a.cc: In function 'int main()':
a.cc:6:9: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
6 | __int64 N, a[100000], count = 0;
| ^~~~~~~
| __int64_t
a.cc:7:16: error: 'N' was not declared in this scope
7 | cin >> N;
| ^
... |
s366140225 | p03767 | C++ | #inclue <bits/stdc++.h>
using namespace std;
int main(){
long long int n,ans=0;
cin >> n;
long long int a[3*n];
for (int i=0;i<3*n;i++)cin >> a[i];
sort(a,a+n);
reverse(a,a+n);
for (int i=0;i<n;i++)ans+=a[1+2*n];
cout << ans <<endl;
} | a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
1 | #inclue <bits/stdc++.h>
| ^~~~~~
| include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
5 | cin >> n;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iost... |
s693640939 | p03767 | C++ | n = int(input())
print(sum(sorted(list(map(int, input().split())), reverse=True)[1:n * 2:2])) | a.cc:1:1: error: 'n' does not name a type
1 | n = int(input())
| ^
|
s026243065 | p03767 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
#define int long long
int main(void) {
int N;
int a[100010];
cin >> N;
for (int i = 0; i < 3*N; i++) cin >> a[i];
sort(a, a+3*N, greater<int>());
int sum = 0;
for (int i = 1; i < 2*N; i += 2) {
sum += a[i];
//cout << a[i] << endl;
}... | cc1plus: error: '::main' must return 'int'
|
s185388439 | p03767 | C++ | #include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
using namespace std;
#define MAX 1000000
typedef long long ll;
int main() {
int N;
ll sum = 0;
cin >> N;
int a[MAX];
for(int i=0; i<3*N; ++i)
cin >> a[i];
sort(a, a+N);
for(int i=0; i<=N; ++i) {}
sum += a[N*2-2*(i+1)];
... | a.cc: In function 'int main()':
a.cc:21:21: error: 'i' was not declared in this scope
21 | sum += a[N*2-2*(i+1)];
| ^
|
s350453819 | p03767 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> vec(N);
for(int i =0; i< N;i++){
cin >> vec.at(i)}
sort(vec.begin(), vec.end());
reverse(vec.begin(), vec.end());
int m=0;
for(int i=1;i < 2* N;i +=2){
m +=vec.at(i)}
cout << m << endl;
} | a.cc: In function 'int main()':
a.cc:9:21: error: expected ';' before '}' token
9 | cin >> vec.at(i)}
| ^
| ;
a.cc:14:18: error: expected ';' before '}' token
14 | m +=vec.at(i)}
| ^
| ;
|
s131678814 | p03767 | C++ | #include <iostream>
#include <vector>
int main()
{
int N;
std::cin >> N;
std::vector<long long> a(3 * N);
for (int i = 0; i < 3 * N; i++)
std::cin >> a[i];
std::sort(a.begin(), a.end());
long long ans = 0;
for (int i = N; i < 3 * N; i += 2)
ans += a[i];
std::cout << ans << std::endl;
return ... | a.cc: In function 'int main()':
a.cc:11:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
11 | std::sort(a.begin(), a.end());
| ^~~~
| qsort
|
s820309426 | p03767 | C++ | #include <iostream>
int main()
{
int N;
std::cin >> N;
std::vector<long long> a(3 * N);
for (int i = 0; i < 3 * N; i++)
std::cin >> a[i];
std::sort(a.begin(), a.end());
long long ans = 0;
for (int i = N; i < 3 * N; i += 2)
ans += a[i];
std::cout << ans << std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:8: error: 'vector' is not a member of 'std'
7 | std::vector<long long> a(3 * N);
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include <iostream>
+++ |+#include <vector>
... |
s626803362 | p03767 | C++ | #include <iostream>
int main()
{
int N;
cin >> N;
std::vector<long long> a(3 * N);
for (int i = 0; i < 3 * N; i++)
std::cin >> a[i];
std::sort(a.begin(), a.end());
long long ans = 0;
for (int i = N; i < 3 * N; i += 2)
ans += a[i];
std::cout << ans << std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> N;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to sta... |
s789800682 | p03767 | C++ | #include <iostream>
int main()
{
int N;
cin >> N;
std::vector<ll> a(3 * N);
for (int i = 0; i < 3 * N; i++)
std::cin >> a[i];
std::sort(a.begin(), a.end());
long long ans = 0;
for (int i = N; i < 3 * N; i += 2)
ans += a[i];
std::cout << ans << std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> N;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to sta... |
s787080921 | p03767 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N;
cin >> N;
vector<long long> a(3*N);
for(int i=1;i<=3*N;i++){cin >> a[i];}
sort(a.begin(), a.end());
long long s=0;
for(long long i=3*N;i>=N+1;i--){
if(i%2==1){s+=a[i];}
}
cout << | a.cc: In function 'int main()':
a.cc:14:10: error: expected primary-expression at end of input
14 | cout <<
| ^
a.cc:14:10: error: expected '}' at end of input
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s078087086 | p03767 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main() {
int N, A[3*N];
cin >> N;
for (int i = 0; i < 3 * N; i++) {
cin >> A[i];
}
sort(A, A + 3 * N);
long long ans=0;
for (int i = N; i < 2 * N; i++) {
ans+=A[i]
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:13:26: error: expected ';' before '}' token
13 | ans+=A[i]
| ^
| ;
14 | }
| ~
|
s364105384 | p03767 | C++ | #include<iostream>
#include<aldorithm>
using namespace std;
int main() {
int N, A[3*N];
cin >> N;
for (int i = 0; i < 3 * N; i++) {
cin >> A[i];
}
sort(A, A + 3 * N);
long long ans=0;
for (int i = N; i < 2 * N; i++) {
ans+=A[i]
}
cout << ans << endl;
} | a.cc:2:9: fatal error: aldorithm: No such file or directory
2 | #include<aldorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s701046268 | p03767 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
int N;
int a[1000000000];
int ans = 0;
int main() {
cin >> N;
for (int i = 0; i < 3 * N; i++) cin >> a[i];
sort(a, a + 3*N, greater<>());
for (int i = N; i < 2*N; i++) ans += a[i];
cout << a... | /tmp/ccNy1eAS.o: in function `main':
a.cc:(.text+0xbe): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccNy1eAS.o
a.cc:(.text+0xc6): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccNy1eAS.o
a.cc:(.text+0xdd): relocation t... |
s227456640 | p03767 | C++ | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
using namespace std;
typedef long long ll;
const int MAXN = (int)1e5 + 5;
bool comp(int a, int b){
return a >= b;
}
void solve() {
ll n;
ll a[10050000... | a.cc: In function 'void solve()':
a.cc:37:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
37 | int main() {
| ^~
a.cc:37:9: note: remove parentheses to default-initialize a variable
37 | int main() {
| ^~
| --
a.cc:37:9: note: o... |
s888707666 | p03767 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll a[100001];
int main()
{
ll n;
scanf("%lld", &n );
for ( int i = 0; i < n * 3; ++i ) {
scanf("%lld", &a[i] );
}
sort( a.begin(), a.end(), greater<ll>() );
ll sum = 0;
for ( int i = 1; i <= n * 2; i += 2 ) {
... | a.cc: In function 'int main()':
a.cc:17:13: error: request for member 'begin' in 'a', which is of non-class type 'll [100001]' {aka 'long long int [100001]'}
17 | sort( a.begin(), a.end(), greater<ll>() );
| ^~~~~
a.cc:17:24: error: request for member 'end' in 'a', which is of non-class type 'l... |
s547999129 | p03767 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
public class main {
public static void main(String[] args) throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = In... | Main.java:7: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s128688098 | p03767 | C++ | #include <iostream>
#include <vector>
#include <alogirthm>
using namespace std;
int N;
int main(){
cin >> N;
vector<long long> v(3*N);
for(int i=0;i<3*N;i++){
cin >> v[i];
}
sort(v.begin(),v.end());
long long ans = 0;
int count = 0,r = 3*N-1;
while(count<N){
ans += v[r-1];
r -= 2;
count++;
}
cout << ... | a.cc:3:10: fatal error: alogirthm: No such file or directory
3 | #include <alogirthm>
| ^~~~~~~~~~~
compilation terminated.
|
s971373014 | p03767 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long
ll sum = 0;
ll a[3 * 123456];
bool cmd(ll x, ll y)
{
return x > y;
}
int n;
inline void _read(int &x)
{
x = 0;
char t = getchar();
while (!isdigit(t)) t = getchar();
while (isdigit(t))
{
x = x * 10 + t - '0';
t = getchar();
}
}
int main()
{
_... | a.cc: In function 'int main()':
a.cc:25:51: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'long long int'
25 | for (int i = 1; i <= 3 * n; i++) _read(a[i]);
| ~~~^
a.cc:11:24: note: initializing argument 1 of 'void _read... |
s145765471 | p03767 | C++ | #include <bits/stdc++.h>
#define ll long long
#define fi first
#define sec second
#define rep(i,a,n) for(int i=a;i<n;i++)
#define per(i,a,n) for(int i=n-1;i>=a;i--)
#define pb push_back
#define pii pair<int,int>
#define sit set<int>:: iterator
#define IOS ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0)
using na... | a.cc: In function 'int main()':
a.cc:26:17: error: 'V' was not declared in this scope
26 | V.pb(cnt);
| ^
a.cc:30:11: error: 'V' was not declared in this scope
30 | cout<<V.size()<<endl;
| ^
|
s701144739 | p03767 | C++ | #include <iostream>
using namespace std;
int main() {
int32_t n;
cin >> n;
int32_t a[3 * n];
for (int32_t i = 0; i < 3 * n; i++) {
cin >> a[i];
}
sort(a, a + 3 * n);
int64_t answer = 0;
for (int32_t i = 1; i <= n; i++) {
answer += a[3 * n - 2 * i];
}
cout <... | a.cc: In function 'int main()':
a.cc:12:5: error: 'sort' was not declared in this scope; did you mean 'short'?
12 | sort(a, a + 3 * n);
| ^~~~
| short
|
s372609431 | p03767 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <cmath>
#include <queue>
using namespace std;
#define FOR(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)
#define FFOR(i,a,b) for(int (i)=(a);(i)>=(b);(i)--)
#define rep(i,n) FOR(i,0,n-1)
#define int long long
#define MOD 998244... | a.cc: In function 'int main()':
a.cc:31:33: error: expected ';' before 'cout'
31 | rep(i,n) ans += a[1+2*i]
| ^
| ;
......
35 | cout << ans << endl;
| ~~~~
|
s783464753 | p03767 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int n;
cin >> n;
vector<int> a(3*n);
for(int i=0;i<3*n;i++) cin >> a[i];
sort(a.begin(),b.begin());
cout << a[n] << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:18: error: 'b' was not declared in this scope
11 | sort(a.begin(),b.begin());
| ^
|
s145523989 | p03767 | C++ | n = int(input())
a = sorted(list(map(int,input().split())),reverse=True)
print(sum([a[i*2+1] for i in range(n)]))
| a.cc:1:1: error: 'n' does not name a type
1 | n = int(input())
| ^
|
s656792009 | p03767 | C++ | #include <iostream>
#include <string>
#include <vector>
#define INC(i, a, b) for(int i = a; i < b; ++i)
#define DEC(i, a, b) for(int i = a; i > b; --i)
#define REP(i, n) INC(i, 0, n)
typedef unsigned int uint;
typedef unsigned long ul;
typedef long long ll;
typedef unsigned long long ull;
void TFprint(bool b, std::... | a.cc: In function 'int main()':
a.cc:32:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
32 | std::sort(a.begin(), a.end(), std::greater<ull>());
| ^~~~
| qsort
|
s742207002 | p03767 | C++ | #include<cstdio>
using namespace std;
int N;
int A[300005];
int main(){
scanf("%d", &N);
for(int i=0;i<3*N;i++){
scanf("%d", &A[i]);
}
sort(A, A+3*N);
long long tot = 0;
for(int i=N;i<2*N;i++){
tot += (long long)A[i];
}
printf("%lld\n", tot);
return 0;
} | a.cc: In function 'int main()':
a.cc:13:9: error: 'sort' was not declared in this scope; did you mean 'short'?
13 | sort(A, A+3*N);
| ^~~~
| short
|
s594579018 | p03767 | C++ | #include <algorithm>
#include <cmath>
#include <iostream>
#include <iomanip>
#include <map>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <list>
#define INF 1000000000ll
#define MOD 1000000007ll
#define EPS 1e-10
#define REP(i,m) for(long long i=0; i<m; i++)
#define FOR(i... | a.cc: In function 'int main()':
a.cc:32:13: error: 'i' was not declared in this scope
32 | for(i = 1; i <= 3 * n; i += 3) ans += a[i];
| ^
|
s019804448 | p03767 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int N;
int a[100000];
unsigned __int64 ans=0;
int num;
int i;
int j;
int c;
int temp;
cin>>N;
for(i=0;i<N*3;i++){
cin>>a[i];
}
for(i=0;i<N;i++){
num=i*3;
for(j=0;j<2;j++){
for(c=0;c<2;c++){
if(a[num+c]>a[num+c+1]){
tem... | a.cc: In function 'int main()':
a.cc:8:19: error: expected initializer before 'ans'
8 | unsigned __int64 ans=0;
| ^~~
a.cc:33:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
33 | ans=ans+a[i];
| ^~~
| abs
a.cc:36:8: error: 'ans' was... |
s770135963 | p03767 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int N;
int a[100000];
unsigned __int64 ans=0;
int num;
int i;
int j;
int c;
int temp;
cin>>N;
for(i=0;i<N*3;i++){
cin>>a[i];
}
for(i=0;i<N;i++){
num=i*3;
for(j=0;j<2;j++){
for(c=0;c<2;c++){
if(a[num+c]>a[num+c+1]){
tem... | a.cc: In function 'int main()':
a.cc:8:19: error: expected initializer before 'ans'
8 | unsigned __int64 ans=0;
| ^~~
a.cc:33:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
33 | ans=ans+a[i];
| ^~~
| abs
a.cc:36:8: error: 'ans' was... |
s410711990 | p03767 | C | // #include {{{
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <forward_list>
#include <functional>
#include <iomanip>
#include <iostream>
... | main.c:2:10: fatal error: algorithm: No such file or directory
2 | #include <algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s231806467 | p03767 | C++ | #include<bits\stdc++.h>
using namespace std;
typedef long long ll;
int N;
ll A[300030];
ll ans = 0;
int main()
{
scanf("%d",&N);
for(int i = 0; i < N * 3; i++)
{
scanf("%d",&A[i]);
}
sort(A,A + N * 3);
for(int i = 0; i < N; i++)ans += A[i + N];
printf("%lld\n",ans);
return 0;
... | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s963003803 | p03767 | Java | import java.util.*;
import java.io.*;
class ColorBall {
static int [] c = new int [200010];
static int [] w = new int [200010];
static long [] fac = new long [200010];
static int mod = 1000000000 + 7;
static long modpow(long b, int e) {
if(e == 0) return 1;
if((e & 1) == 1) return ... | Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
|
s298460773 | p03767 | C++ | #include <cstdio>
#include <cstring>
#include <iostream>
#include <set>
#include <vector>
using namespace std;
#define DEBUG(X) cerr<<__LINE__<<" "<<#X<<": "<<X<<endl;
#define REP(i,y) for(int i=0;i<(int)(y);i++)
#define REPP(i,y) for(int i=1;i<=(int)(y);i++)
#define sci(x) int x;scanf("%d",&x);
#define scii(x, y) int... | a.cc: In function 'void solve()':
a.cc:22:3: error: 'sort' was not declared in this scope; did you mean 'short'?
22 | sort(v.begin(), v.end());
| ^~~~
| short
|
s068676176 | p03767 | C++ | #include<stdio.h>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<bitset>
#include<utility>
#include<functional>
#include<iomanip>
#include<sstream>
#include<ctime>
#include<cassert>
using namespace std;
#de... | a.cc: In function 'int main()':
a.cc:139:29: error: 'mimi' was not declared in this scope; did you mean 'mini'?
139 | tar=mimi;
| ^~~~
| mini
|
s234589285 | p03767 | Java | import java.util.Arrays;
import java.util.Scanner;
public class A12
{
public static void main( String[] args )
{
Scanner s = new Scanner( System.in );
int n = s.nextInt();
int[] strengths = new int[3*n];
for(int i = 0; i < 3*n; i++)
{
strengths[i] = s.nextInt();
}
Arrays.sort( strengths );
... | Main.java:4: error: class A12 is public, should be declared in a file named A12.java
public class A12
^
1 error
|
s209824927 | p03767 | C++ | #include<bits/stdc++.h>
#include<unordered_map>
/*
*▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
* ▀▀ ▀▀▀▀▀▀ ▀ ▀▀▀▀▀▀ ▀ ▀
* ▀ ▀ ▀ ▀ ▀ ▀ ▀
* ▀ ▀ ▀ ▀ ▀ ▀ ▀ ▀ ▀ ▀
* ▀ ▀▀▀▀ ▀ ▀ ▀ ▀ ▀
*▀ ▀ ▀ ▀ ... | a.cc: In function 'int main()':
a.cc:20:12: error: expected primary-expression before 'long'
20 | #define ll long long
| ^~~~
a.cc:22:37: note: in expansion of macro 'll'
22 | #define loopi(i,intial,n) for(ll i=ll(intial);i<n;i++)
| ^~
a.cc:57:4: note: i... |
s045066713 | p03767 | C++ | #include<bits/stdc++.h>
#include<unordered_map>
/*
*▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
* ▀▀ ▀▀▀▀▀▀ ▀ ▀▀▀▀▀▀ ▀ ▀
* ▀ ▀ ▀ ▀ ▀ ▀ ▀
* ▀ ▀ ▀ ▀ ▀ ▀ ▀ ▀ ▀ ▀
* ▀ ▀▀▀▀ ▀ ▀ ▀ ▀ ▀
*▀ ▀ ▀ ▀ ... | a.cc: In function 'int main()':
a.cc:20:12: error: expected primary-expression before 'long'
20 | #define ll long long
| ^~~~
a.cc:22:37: note: in expansion of macro 'll'
22 | #define loopi(i,intial,n) for(ll i=ll(intial);i<n;i++)
| ^~
a.cc:57:4: note: i... |
s515123958 | p03767 | C++ | n = int(raw_input())
ls = map(int, raw_input().split())
ls.sort()
sum = 0
for i in range(n):
sum += ls[n+i*2]
print sum
| a.cc:1:1: error: 'n' does not name a type
1 | n = int(raw_input())
| ^
|
s605132955 | p03767 | Java | import java.math.BigInteger;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public class Solution {
public Solution() {
// TODO Auto-generated constructor stub
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc... | Main.java:7: error: class Solution is public, should be declared in a file named Solution.java
public class Solution {
^
1 error
|
s537005689 | p03767 | C++ | #include<iostream>
#include<stack>
using namespace std;
static const int N = 100001;
int n, m,q,color[N];
void dfs(int v,int d,int c) {
color[v]=c;
if(d==0) return;
d--;
for(int i=1;i<=n;i++){
if(M[v][i]==1||M[i][v]==1){
dfs(i,d,c);
}
}
for(int i=1;i<=n;i++){
//ぬる
}
}
int main()
{... | a.cc: In function 'void dfs(int, int, int)':
a.cc:13:8: error: 'M' was not declared in this scope
13 | if(M[v][i]==1||M[i][v]==1){
| ^
a.cc: In function 'int main()':
a.cc:32:29: error: invalid types 'int[int]' for array subscript
32 | M[i][j] = 0;
| ... |
s532080541 | p03767 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
// freopen("1.txt", "r", stdin);
// freopen("2.txt", "w", stdout);
int n;
cin >> n;
vector <long long> a(3 * n);
for (int i = 0; i < 3 * n; i++) {
cin >> a[i];
}
sort(a.begin(), a.end());
ll ans = 0;
for (i... | a.cc: In function 'int main()':
a.cc:21:5: error: 'll' was not declared in this scope
21 | ll ans = 0;
| ^~
a.cc:23:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
23 | ans += a[j];
| ^~~
| abs
a.cc:25:13: error: 'ans' was not declared in this ... |
s765014611 | p03767 | C++ | #include <iostream>
#include <algorithm>
using namespace std
int main(){
int a[1000000010];
int N;
cin >> N;
for (int i=0;i<N*3;i++){
cin >> a[i];
}
sort(a,a+N*3);
int sum=0;
for (int i=0;i<N;i++){
sum += a[i*3+1];
}
cout << sum <<endl;
return 0;
} | a.cc:4:20: error: expected ';' before 'int'
4 | using namespace std
| ^
| ;
5 |
6 | int main(){
| ~~~
|
s829475471 | p03767 | C++ | #include <iostream>
#include <algorythm>
using namespace std
int main(){
int a[1000000010];
int N;
cin >> N;
for (int i=0;i<N*3;i++){
cin >> a[i];
}
sort(a,a+N*3);
int sum=0;
for (int i=0;i<N;i++){
sum += a[i*3+1];
}
cout << sum <<endl;
return 0;
} | a.cc:2:10: fatal error: algorythm: No such file or directory
2 | #include <algorythm>
| ^~~~~~~~~~~
compilation terminated.
|
s841288112 | p03767 | C++ | #include<iostream>
#include<iomanip>
#include<cmath>
#include<algorithm>
#include<vector>
#include<map>
#include<cassert>
#include<cstring>
#include<bitset>
#include<queue>
typedef long long ll;
using namespace std;
int const N = 100 * 1000 + 16;
int const M = 1000 * 1000 * 1000 + 7;
int const inf = 1000 * 1000 * 1000... | a.cc: In function 'int main()':
a.cc:27:16: error: 'istream_iterator' was not declared in this scope
27 | copy_n(istream_iterator<int>(cin), 3 * n, a);
| ^~~~~~~~~~~~~~~~
a.cc:11:1: note: 'std::istream_iterator' is defined in header '<iterator>'; this is probably fixable by adding '#incl... |
s878006780 | p03767 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
# define MAX_N
# define MAX_W
int solve();
int dp[MAX_N+1][MAX_W+1];
int main(void){
int n;
cout << n;
solve();
}
int rec(int i,int j){
if(dp[i][j]>0){
return dp[i][j];
}
int res;
if(i == n){
res = 0;
}
else if(j < w[i]... | a.cc: In function 'int rec(int, int)':
a.cc:24:11: error: 'n' was not declared in this scope
24 | if(i == n){
| ^
a.cc:27:15: error: 'w' was not declared in this scope
27 | else if(j < w[i]) {
| ^
a.cc:31:40: error: 'v' was not declared in this scope
31 | res = max(r... |
s804903826 | p03767 | C++ | #include <bits\stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[3*n];
for (int i=0; i<3*n; i++) {
cin >> a[i];
}
sort(a, a+3*n);
long long sum=0;
for (int i=n+1; i<2*n+1; i++) {
sum += a[i];
}
cout << sum << endl;
}
| a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory
1 | #include <bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s972669438 | p03767 | C++ | #include<bits/stdc++.h>
int a[600010],n,s;
int main()
{
scanf("%d",&n);
for(int i=6*n;i;--i)scanf("%d",&a[i]);
std::sort(a+1,a+6*n+1;++i);
for(int i=1;i<=n;++i)s+=a[6*n-2*i+1];
printf("%d\n",s);
return 0;
} | a.cc: In function 'int main()':
a.cc:7:26: error: expected ')' before ';' token
7 | std::sort(a+1,a+6*n+1;++i);
| ~ ^
| )
a.cc:7:29: error: 'i' was not declared in this scope
7 | std::sort(a+1,a+6*n+1;++i);
| ^... |
s593698886 | p03767 | C++ | n = int(raw_input())
arr = sorted(map(int, raw_input().split()))
print sum(map(lambda i: arr[n + 2 * i], range(n)))
| a.cc:1:1: error: 'n' does not name a type
1 | n = int(raw_input())
| ^
|
s306823213 | p03767 | C++ | 1 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1
| ^
|
s359096273 | p03767 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int nmax = 100010; const LL mod = 1000003;
int N,M,c[nmax],lg[2005][2005],w,as[nmax];
vector<int>G[nmax];
void fct(int nod,,tata,int d,int cul){
if(d >= 0&&!c[nod])c[nod] = cul;
if(!d) return;
for(auto it: G[nod])
if(it != tata)... | a.cc:12:18: error: expected identifier before ',' token
12 | void fct(int nod,,tata,int d,int cul){
| ^
a.cc:12:19: error: 'tata' has not been declared
12 | void fct(int nod,,tata,int d,int cul){
| ^~~~
a.cc: In function 'void fct(int, int, int, int, int)':
a.cc:17:1... |
s824239992 | p03767 | C++ | d | a.cc:1:1: error: 'd' does not name a type
1 | d
| ^
|
s234548758 | p03767 | C | #include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<int64_t> array(3*N);
for(int64_t i=0;i<3*N;i++)
cin >> array[i];
sort(array.begin(), array.end());
int64_t ans = 0;
for(int64_t i=N;i<3*N;i+=2)
ans += array[i];
cout << ans <<... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s111319590 | p03767 | C++ | #include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<int64_t> array(3*N);
for(int64_t i=0;i<3*N;i++)
cin >> array[i];
sort(array.begin(), array.end());
int64_t ans = 0;
for(int64_t i=N;i<3*N;i+=2)
ans += array[i];
cout << ans <<... | a.cc: In function 'int main()':
a.cc:16:3: error: 'sort' was not declared in this scope; did you mean 'short'?
16 | sort(array.begin(), array.end());
| ^~~~
| short
|
s735019832 | p03767 | C++ | #include <algorithm>
#include <stdio.h>
#include <functional>
using namespace std;
int N, M, i;
long long int r;
template<typename ...> static inline int gc(void) { return getchar(); }
static inline void read(int &x){int k=gc();x=0;for(;;k=gc()){if(isdigit(k)){x=k-48;break;}}for(;;){k=gc();if(!isdigit(k))break;x=x*10... | a.cc: In function 'void read(int&)':
a.cc:10:65: error: 'isdigit' was not declared in this scope
10 | static inline void read(int &x){int k=gc();x=0;for(;;k=gc()){if(isdigit(k)){x=k-48;break;}}for(;;){k=gc();if(!isdigit(k))break;x=x*10+k-48;}}
| ^... |
s950301423 | p03767 | C++ | #include <algorithm>
#include <stdio.h>
using namespace std;
long long int N, M, a[114514], r;
template<typename ...> static inline int gc(void) { return getchar(); }
static inline void read(long long int &x){int k,m=0;x=0;for(;;){k=gc();if(k==45){m=1;break;}if(48<=k&&k<=57){x=k-48;break;}}for(;;){k=gc();if(k<48||k>5... | a.cc: In function 'int main()':
a.cc:16:24: error: 'greater' was not declared in this scope
16 | sort(a, a + N * 3, greater<long long int>());
| ^~~~~~~
a.cc:16:32: error: expected primary-expression before 'long'
16 | sort(a, a + N * 3, greater<long long int>());
| ... |
s145504411 | p03767 | C++ | #include<iostream>
#include<cmath>
#include<cstdlib>
#include<algorithm>
using namespace std;
bool cmp(int x,int y){
return x>y;
}
int main(){
int n;
ll sum=0;
long long a[1000005];
cin>>n;
for(int i=0;i<3*n;i++)cin>>a[i];
sort(a,a+3*n,cmp);
for(int i=1;i<=2*n;i+=2){
sum+=a[i];
}
cout<<sum<<endl;
} | a.cc: In function 'int main()':
a.cc:11:1: error: 'll' was not declared in this scope
11 | ll sum=0;
| ^~
a.cc:17:17: error: 'sum' was not declared in this scope
17 | sum+=a[i];
| ^~~
a.cc:19:15: error: 'sum' was not declared in this scope
19 | cout<<sum<<end... |
s693960628 | p03767 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cstdint>
using namespace std;
int main()
{
int_least32_t n;
cin >> n;
vector<int_least32_t> v(3 * n);
for(auto& x : v) {
cin >> v;
}
sort(v.begin(), v.end());
int_least64_t sum{ accumulate(v.begin() + n, v.begin() + 2 ... | a.cc: In function 'int main()':
a.cc:16:21: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<int>')
16 | cin >> v;
| ~~~ ^~ ~
| | |
| | std::vector<int>
... |
s437054326 | p03767 | C++ | #include <cstdio>
#include <algorithm>
using namespace std;
int main(){
int N;
scanf("%d", &N);
int a[3*N];
for (int i = 0; i < 3*N; i++){
scanf(" %d", &a[i]);
}
sort(a, a+3*N);
int sum=0;
for (int i = 0; i < N; i++){
sum += a[3*N-(2*i+1)-1];
}
printf("%d\n",... | a.cc:25:1: error: expected unqualified-id before '[' token
25 | [ohwa
| ^
|
s024171223 | p03767 | C++ | n = input()
x = [int(_) for _ in input().split()]
x.sort()
print(sum(x[n:n*2]))
| a.cc:1:1: error: 'n' does not name a type
1 | n = input()
| ^
|
s971931276 | p03767 | C++ | #include <cstdio>
#include <algorithm>
#include <deque>
#include <iostream>
using namespace std;
deque<int> A;
long long n;
int tol;
void solve(long long n) {
if (n==0ll) return;
if (n%2ll==0ll) {
solve(n-1ll);
A.push_back(++tol);
A.push_back(tol);
}
else {
solve(n/2ll);
A.front(++tol);
A.push_back(tol)... | a.cc: In function 'void solve(long long int)':
a.cc:18:24: error: no matching function for call to 'std::deque<int>::front(int&)'
18 | A.front(++tol);
| ~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/deque:66,
from a.cc:3:
/usr/include/c++/14/bits/stl_... |
s838470655 | p03767 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <queue>
using namespace std;
const int N = 1e5;
typedef long long LL;
int a[N * 3 + 5];
int main()
{
int n;
scanf("%d",&n);
for(int i = 1 ; i <= 3 * n ; i++) scanf("%d",&a[i]);
sort(a + 1 , a + 1 + 3 * n );
LL sum1 = 0 , sum2 = ... | a.cc: In function 'int main()':
a.cc:21:21: error: unable to find numeric literal operator 'operator""n'
21 | for(int i = 3n - 1 ,cnt = 1 ; cnt <= n ; i -= 2 , cnt++ ) sum1 += a[i];
| ^~
|
s838455563 | p03767 | C | #include <iostream>
#include <algorithm>
using namespace std;
int main() {
int n;
cin >> n;
long a[3 * n];
for (int i = 0; i < n * 3; i++) {
cin >> a[i];
}
sort(a, a + (3 * n) );
long long count = 0;
for (int i = 0; i < n; i++) {
count += a[3 * n - 1 - (i * 2 + 1)] ;
}
cout << count << endl... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s908582622 | p03767 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <queue>
using namespace std;
const int N = 1e5;
typedef long long LL;
int a[N * 3 + 5];
int main()
{
int n;
scanf("%d",&n);
for(int i = 1 ; i <= 3 * n ; i++) scanf("%d",&a[i]);
sort(a + 1 , a + 1 + 3 * n );
LL sum1 = 0 , sum2 = ... | a.cc: In function 'int main()':
a.cc:21:21: error: unable to find numeric literal operator 'operator""n'
21 | for(int i = 3n - 1 ,cnt = 1 ; cnt <= n ; i -= 2 , cnt-- ) sum1 += a[i];
| ^~
|
s259088858 | p03767 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <queue>
using namespace std;
const int N = 1e5;
typedef long long LL;
int a[N * 3 + 5];
int main()
{
int n;
scanf("%d",&n);
for(int i = 1 ; i <= 3 * n ; i++) scanf("%d",&a[i]);
sort(a + 1 , a + 1 + 3 * n );
LL sum1 = 0 , sum2 = ... | a.cc: In function 'int main()':
a.cc:20:21: error: unable to find numeric literal operator 'operator""n'
20 | for(int i = 3n - 1 ,cnt = 1 ; cnt <= n ; i -= 2 , cnt-- ) sum1 += a[i];
| ^~
a.cc:20:39: error: 'cnt' was not declared in this scope; did you mean 'int'?
20 | for... |
s174646840 | p03767 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(int argc, char const *argv[]) {
int N;
cin >> N;
vector<int> a;
for(int i=0;i<3*N;i++){
int ai;
cin >> ai;
a.push_back(ai);
}
sort(a.begin(),a.end());
long long int ans=0;
for(int i=N;i<2*N;i++){
... | a.cc: In function 'int main(int, const char**)':
a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort(a.begin(),a.end());
| ^~~~
| short
|
s701095933 | p03767 | C++ | //============================================================================
// Name : atcoder.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <i... | In file included from /usr/include/c++/14/algorithm:61,
from a.cc:12:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<greater<int>... |
s863980487 | p03767 | C | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define rep(i,n) for(i=0;i<n;i++)
long long dp[50][50];
int in(void){
int i;
scanf("%d",&i);
return i;
}
long long llin(void){
long long i;
scanf("%lld",&i);
return i;
}
int cmp(const void *a,const void *b){
return *a-*b;
}
long long mi... | main.c: In function 'cmp':
main.c:18:16: warning: dereferencing 'void *' pointer
18 | return *a-*b;
| ^~
main.c:18:19: warning: dereferencing 'void *' pointer
18 | return *a-*b;
| ^~
main.c:18:16: error: void value not ignored as it ought to be
18 | ... |
s542977335 | p03767 | C++ | #include <bits/stdc++.h>
using namespace std;
static const int MAXN = 3 * 1e5 + 10;
typedef __int64 LL;
int n;
int data[MAXN] = {0};
int main()
{
scanf("%d" , &n);
n *= 3;
for(int i = 0 ; i < n ; ++i)
scanf("%d" , data + i);
sort(data , data + n);
int l = 0 , r = n - 2;
LL ans = 0;
i... | a.cc:4:9: error: '__int64' does not name a type; did you mean '__int64_t'?
4 | typedef __int64 LL;
| ^~~~~~~
| __int64_t
a.cc: In function 'int main()':
a.cc:12:22: error: reference to 'data' is ambiguous
12 | scanf("%d" , data + i);
| ^~~~
In file i... |
s491397595 | p03767 | C++ | #include <iostream> | 1 10
2 #include <algorithm> ... | a.cc:1:116: warning: extra tokens at end of #include directive
1 | #include <iostream> | 1 10
| ^
a... |
s369131700 | p03767 | C++ | #include <iostream>
using namespace std;
int main(){
int m;
cin >> m;
int n = 3*m;
long long int a[n];
for(int i = 0; i < n; i++){
cin >> a[i];
}
// sort
int max;
long long int sum = 0;
for(int i = 0; i < n-1; i++){
if(i >= m*2) break;
flag swap = false;
max = i;
f... | a.cc: In function 'int main()':
a.cc:30:5: error: 'flag' was not declared in this scope
30 | flag swap = false;
| ^~~~
a.cc:36:16: error: overloaded function with no contextual type information
36 | swap = true;
| ^~~~
a.cc:41:12: error: cannot resolve overloaded functio... |
s752380499 | p03767 | C++ | #include <iostream>
#include <iomanip>
#include <cmath>
#include <queue>
#include <map>
#include <cstdlib>
#include <string>
#include <functional>
using namespace std;
int main(void)
{
int n;
vector <int>aaaa(300000);
cin >> n;
for (int i = 0; i < n * 3; ++i) {
cin >> aaaa[i];
}
long long int sum = 0;
sort(aa... | a.cc: In function 'int main()':
a.cc:20:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
20 | sort(aaaa.begin(), aaaa.end(), greater<int>());
| ^~~~
| sqrt
|
s335567488 | p03767 | Java | import java.util.Scanner;
import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;
import static java.lang.Math.*;
public class Check2
{
static class InputReader
{
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
private Spa... | Main.java:8: error: class Check2 is public, should be declared in a file named Check2.java
public class Check2
^
1 error
|
s302444616 | p03767 | Java | /**
* Created by Karan Jobanputra on 01-04-2017.
*/
import java.util.Scanner;
import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;
import static java.lang.Math.*;
public class AtCoderGroupContest {
static class InputReader {
private InputStream stream;
private byte[] bu... | Main.java:13: error: class AtCoderGroupContest is public, should be declared in a file named AtCoderGroupContest.java
public class AtCoderGroupContest {
^
1 error
|
s924090413 | p03767 | C++ | #include <bits/stdc++.h>
using namespace std;
long long sum=0;
int n,st=1,V[100001];
int main()
{
cin>>n;
n*=3;
for(int i=1;i<=n;i++) f>>V[i];
sort(V+1,V+1+n);
for(int i=n-1;i>=st;i-=2) sum+=V[i],st++;
cout<<sum;
}
| a.cc: In function 'int main()':
a.cc:11:27: error: 'f' was not declared in this scope
11 | for(int i=1;i<=n;i++) f>>V[i];
| ^
|
s142582536 | p03767 | C++ | #include <iostream>
#include <sstream>
#include <numeric>
#include <algorithm>
#include <functional>
#include <iterator>
#include <bitset>
#include <string>
#include <list>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
typedef signed long long int slli;
typedef unsigned long long ... | a.cc: In function 'int main()':
a.cc:63:13: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<long long unsigned int>')
63 | std::cerr << a << std::endl;
| ~~~~~~~~~ ^~ ~
| | |
| | std::vector<long long... |
s883574812 | p03767 | Java | import java.util.Arrays;
import java.util.Scanner;
public class A {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int a[]=new int[3*n];
for(int i =0;i<n;i++){
a[3*i]=scan.nextInt();
a[3*i + 1]=scan.nextInt();
a[3*i ... | Main.java:4: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s895030137 | p03767 | C++ | #include <iostream>
#include <vector>
#include "unordered_map"
#include <cmath>
#include <climits>
using ull=unsigned long long;
using namespace std;
int main() {
// freopen("/Users/balazskemenes/Documents/temp/practise/src/problems/input.txt","r",stdin);
int N;
cin >> N;
int limit = N... | a.cc: In function 'int main()':
a.cc:48:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
48 | sort(vec.begin(), vec.end(), [](int a, int b) {return a > b;});
| ^~~~
| sqrt
|
s138570615 | p03767 | C++ | // UNNECESSARY
// #include <chrono>//std::chrono::/system_clock/steady_clock/high_resolution_clock/duration
// #include <cstdio>//printf/scanf/fopen/fclose/fprintf/fscanf/snprintf/putc/puts/getc/gets
// #include <fstream>//ifstream/ofstream
// DATA STRUCTURES
#include <array>
#include <bitset>
#include <list>
#include... | a.cc: In function 'int main()':
a.cc:75:9: error: no matching function for call to 'read(size_t&, std::vector<long long unsigned int>&)'
75 | read(n, a);
| ~~~~^~~~~~
a.cc:55:28: note: candidate: 'template<class T> void read(size_t, T*)'
55 | template <typename T> void read(size_t n, T* a) {
|... |
s502377287 | p03767 | C++ | include<bits/stdc++.h>
#define INF 1e9+7
#define ll long long
#define F first
#define S second
#define N 300005
#define M 1000000009
#define mp make_pair
#define ull unsigned long long
#define sc(n) scanf("%d",&n)
#define gcd __gcd
#define pb push_back
using namespace std;
int a[N];
int main(){
ios_base::sync_with_std... | a.cc:1:1: error: 'include' does not name a type
1 | include<bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:16:9: error: 'ios_base' has not been declared
16 | ios_base::sync_with_stdio(0);
| ^~~~~~~~
a.cc:19:9: error: 'cin' was not declared in this scope
19 | ... |
s971549376 | p03767 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N;
long long X=0;
cin >> N;
int a[3*N];
for (int i=0;i<3*N;i++){
cin >> a[i];
}
sort(a.rbegin(),a.rend());
for(int i=0;i<N;i++){
X+=a[i*2];
}
cout << X << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:10: error: request for member 'rbegin' in 'a', which is of non-class type 'int [(N * 3)]'
12 | sort(a.rbegin(),a.rend());
| ^~~~~~
a.cc:12:21: error: request for member 'rend' in 'a', which is of non-class type 'int [(N * 3)]'
12 | sort(a.rbegin(),a.rend(... |
s064268673 | p03767 | C | #include <iostream>
#include <algorithm>
using namespace std;
int main() {
int n;
cin >> n;
long a[3 * n];
for (int i = 0; i < n * 3; i++) {
cin >> a[i];
}
sort(a, a + (3 * n) );
long long count = 0;
for (int i = 0; i < n; i++) {
count += a[3 * n - 1 - (i * 2 + 1)] ;
}
cout << count << endl;
re... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s292951694 | p03767 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int n;
ll a[300010];
int main() {
while(scanf("%d", &n)!=EOF){
for(int i=0; i<3*n; i++) scanf("%lld", &a[i]);
sort(a, a+3*n);
ll sum=0;
for(
sum += a[3*n-2-2*i];
}
printf("%lld\n", sum)... | a.cc: In function 'int main()':
a.cc:14:30: error: 'i' was not declared in this scope
14 | sum += a[3*n-2-2*i];
| ^
a.cc:15:9: error: expected primary-expression before '}' token
15 | }
| ^
a.cc:14:33: error: expected ';' before '}' token
14 ... |
s780187235 | p03767 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<int> v(N);
for (int i = 0; i < 3*N; i++) {
sort(v.begin(), v.end());
long long ans = 0;
for (int i = 0; i < N; i++) {
ans += v[N-1+i];
}
cout << ans << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:16:2: error: expected '}' at end of input
16 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s319421237 | p03767 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
int main()
{
int N;
cin >> N;
vector<int> a(3 * N);
for (int i = 0; i < 3 * N; i++) cin >> a[i];
long long ans = 0;
sort(a.begin(), a.end());
int index = 3 * N - 2;
for (int i = 0; i < N; i++) {
ans... | a.cc: In function 'int main()':
a.cc:21:29: error: expected '}' at end of input
21 | cout << ans << endl;
| ^
a.cc:9:1: note: to match this '{'
9 | {
| ^
|
s751208180 | p03767 | C++ | #include <iostream>
using namespace std;
const int maxN = 1e5;
int a[4 * maxN];
int main() {
int n;
ios_base::sync_with_stdio(0);
cin >> n;
for (int i = 0; i < 3 * n; i++) {
cin >> a[i];
}
sort(a, a + 3 * n);
long long sum = 0;
for (int i = n; i < 3 * n; i += 2) {
sum ... | 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 + 3 * n);
| ^~~~
| short
|
s020338265 | p03767 | C++ | #include <bits/stdc++.h>
typedef long long LL;
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
using namespace std;
int main(void)
{
int n;
cin >> n;
vector<int> a(n*3);
REP(i,n*3) cin >> a[i];
SORT(a);
LL answer = 0ll;
REP(i,n) answ... | a.cc: In function 'int main()':
a.cc:17:28: error: expected ';' before 'cout'
17 | REP(i,n) answer+=a[n+i*2]
| ^
| ;
18 | cout << answer << endl;
| ~~~~
|
s749135879 | p03767 | C++ | #include <algorithm>
using namespace std;
const int MAXN = 3E5 + 10;
int n;
int a[MAXN];
int main(){
scanf("%d", &n);
int n0 = n * 3;
for (int i = 0; i < n0; ++i)
scanf("%d", a + i);
sort(a, a + n0);
long long ans = 0;
for (int i = 0; i < n; ++i)
ans += a[n + (i << 1)];
printf("%lld\n", ans);
return 0;
... | a.cc: In function 'int main()':
a.cc:11:9: error: 'scanf' was not declared in this scope
11 | scanf("%d", &n);
| ^~~~~
a.cc:19:9: error: 'printf' was not declared in this scope
19 | printf("%lld\n", ans);
| ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'... |
s284887835 | p03767 | Java | import java.util.Scanner;
import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;
import static java.lang.Math.*;
public class Check2
{
static class InputReader
{
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
private Spac... | Main.java:8: error: class Check2 is public, should be declared in a file named Check2.java
public class Check2
^
1 error
|
s870340944 | p03767 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
using namespace std;
typedef long long int lli;
int main(void)
{
lli n;
scanf("%lld", &n);
lli a[3*n];
for(lli i = 0;i < 3*n;i++) scanf("%lld", &a[i]);
sort(a, a+3*n);
lli res = 0;
for(lli i = n;i < 2*n;i++) res += a[i];
printf("%lld\n", res);
} | a.cc: In function 'int main()':
a.cc:14:9: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort(a, a+3*n);
| ^~~~
| short
|
s940785046 | p03767 | C++ |
import java.io.*;
import java.math.*;
import java.util.*;
import static java.util.Arrays.*;
public class Main {
private static final int mod = (int)924844033;
final Random random = new Random(0);
final IOFast io = new IOFast();
/// MAIN CODE
public void run() throws IOException {
// int TEST_CASE = Integer.p... | a.cc:2:1: error: 'import' does not name a type
2 | import java.io.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.math.*;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: ... |
s662610899 | p03768 | Java | import utils.GraphUtils;
import java.io.*;
import java.util.*;
/**
* Created by Katushka on 11.03.2020.
*/
public class Main {
static int[] readArray(int size, InputReader in) {
int[] a = new int[size];
for (int i = 0; i < size; i++) {
a[i] = in.nextInt();
}
return a... | Main.java:1: error: package utils does not exist
import utils.GraphUtils;
^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
|
s140893696 | p03768 | C++ | #include <iostream>
#include <vector>
#define ll long long
using namespace std;
#define pb push_back
const int N = 1e5 + 5;
inline int read() {
int x = 0; char ch = getchar();
for (; !isdigit(ch); ch = getchar());
for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
return x;
}
void W(int x) { i... | a.cc: In function 'int main()':
a.cc:26:5: error: 'memset' was not declared in this scope
26 | memset(mx, -1, sizeof(mx));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <vector>
+++ |+#include <cstring>
... |
s127565727 | p03768 | C++ | . | a.cc:1:1: error: expected unqualified-id before '.' token
1 | .
| ^
|
s518829910 | p03768 | C++ | #include<iostream>
#include<stdio.h>
#include<math.h>
#include<string>
#include<string.h>
#include<algorithm>
#include<vector>
using namespace std;
#define ll long long
const int maxn = 1e5+10;
int n,m,q;
vector <int> vec[maxn];
int ans[maxn];
int dp[maxn][11];
int x[maxn],y[maxn],z[maxn];
int vis[maxn];
void dfs(int u... | a.cc: In function 'int main()':
a.cc:41:45: error: 'dfs2' was not declared in this scope; did you mean 'dfs'?
41 | for(int i=q;i;i--) dfs(x[i],y[i],i),dfs2(x[i],y[i]);
| ^~~~
| dfs
|
s310869627 | p03768 | C++ | #pragma GCC optimize ("O3")
#pragma GCC target ("avx")
//#include<bits/stdc++.h>
#include<cstdio>
#include<algorithm>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) <... | a.cc: In function 'void sagasu(int, char, int)':
a.cc:62:48: error: request for member 'second' in 'E[p]', which is of non-class type 'int'
62 | for (int p = H[P]; p; p = E[p].second) {
| ^~~~~~
a.cc:63:37: error: request for member 'first' in 'E[p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.