submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s562819330 | p03817 | Java | mport java.io.*;
import java.util.*;
/**
*
* @author baito
*/
public class Main
{
static StringBuilder sb = new StringBuilder();
static FastScanner sc = new FastScanner(System.in);
static int INF = 1234567890;
static long MOD =1000000007;
static int[] y4 = {0,1,0,-1};
static int[] x4 = {1,0,... | Main.java:1: error: class, interface, enum, or record expected
mport java.io.*;
^
Main.java:2: error: class, interface, enum, or record expected
import java.util.*;
^
2 errors
|
s971148481 | p03817 | C++ | #include <cstdio>
using namespace std;
int main() {
long long x;
scanf("%lld", &x);
long long set;
set = x / 11;
if (x % 11 >= 7) {
printf("%lld", set*2 + 2);
} else if (x % 11 > 0) {
printf("%lld", set*2 + 1);
} else {
printf("%lld", set*2);
return 0;
}
| a.cc: In function 'int main()':
a.cc:17:2: error: expected '}' at end of input
17 | }
| ^
a.cc:5:12: note: to match this '{'
5 | int main() {
| ^
|
s149098983 | p03817 | C | #import<stdio.h> main(){long long x;scanf("%lld",&x);printf("%lld\n",x/11*2+(x%11+5)/6);}
| main.c:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<stdio.h> main(){long long x;scanf("%lld",&x);printf("%lld\n",x/11*2+(x%11+5)/6);}
| ^~~~~~
main.c:1:18: warning: extra tokens at end of #import directive
1 | #import<stdio.h> main(){long long x;scanf("%lld",&x);printf("... |
s598416801 | p03817 | C | #import<stdio.h>main(){long long x;scanf("%lld",&x);printf("%lld\n",x/11*2+(x%11+5)/6);}
| main.c:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<stdio.h>main(){long long x;scanf("%lld",&x);printf("%lld\n",x/11*2+(x%11+5)/6);}
| ^~~~~~
main.c:1:17: warning: extra tokens at end of #import directive
1 | #import<stdio.h>main(){long long x;scanf("%lld",&x);printf("%l... |
s479933048 | p03817 | C++ | #include <bits/stdc++.h>
using namespace std;
#define endl '\n'
typedef long long ll;
const int maxn = 0;
int n;
int main()
{
ios_base::sync_with_stdio(0); cin.tie(NULL);
ll x;
cin >> x;
double ans = (double)x / 11;
ans = ans * 2;
ll lol = ceil(ans);
// if(x <= 6) cout << 1;
else cout << lol;
} | a.cc: In function 'int main()':
a.cc:18:9: error: 'else' without a previous 'if'
18 | else cout << lol;
| ^~~~
|
s451820026 | p03817 | C++ |
#define dump(x) cout << #x << " = " << (x) << endl;// debug cout
#define FOR(i,a,b) for(int i=(a);i<(b);++i)// for macro
#define REP(i,n) for(int i=0;i<(n);++i)
#define REPR(i,n) for(int i=n;i>=0;i--)
#define ALL(obj) (obj).begin(),(obj).end()// iterator
#define pb(a) push_back(a)//push_back
#define mp make_pair//... | a.cc: In function 'int main()':
a.cc:18:5: error: 'll' was not declared in this scope
18 | ll x;
| ^~
a.cc:19:5: error: 'cin' was not declared in this scope
19 | cin>>x;
| ^~~
a.cc:19:10: error: 'x' was not declared in this scope
19 | cin>>x;
| ^
a.cc:20:7: error:... |
s299889603 | p03817 | C++ | import math
X=int(input())
res=(1 if X <= 5 else math.ceil(X/11*2))
print(res) | a.cc:1:1: error: 'import' does not name a type
1 | import math
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s986927197 | p03817 | C++ | #include <iostream>
using namespace std;
int main(){
long long x;
cin>>x;
long long p=x/11;
if(p*11==x)p--;
long long ans=p
p*=11;
if(x-p<=6)ans++;
else ans+=2;
cout<<ans;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:1: error: expected ',' or ';' before 'p'
11 | p*=11;
| ^
|
s793121928 | p03817 | C++ | N = gets.to_i
puts N/11 *2 + (N%11 > 6 ? 2 : 1)
| a.cc:1:1: error: 'N' does not name a type
1 | N = gets.to_i
| ^
|
s543343318 | p03817 | C++ | #include <bits/stdc++.h>
#define ll long long
using namespace std;
ll x, ans;
ll r[11] = {0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2};
int main(void){
cin >> x;
ans += x/11*2 +r[x%11];
cout << ans << endl;
return 0;
} | a.cc:5:47: error: too many initializers for 'long long int [11]'
5 | ll r[11] = {0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2};
| ^
|
s387504646 | p03817 | Java | //Do what you can't.
import java.io.*;
import java.util.*;
import java.math.BigInteger;
public class Main {
public static void main(String[] args) {
InputReader in = new InputReader(System.in);
PrintWriter w = new PrintWriter(System.out);
long x = in.nextLong() ;
long ans = x / 11;
ans += ans;
... | Main.java:15: error: 'else' without 'if'
else if (x % 11 > 0)
^
1 error
|
s336323603 | p03817 | Java | //Do what you can't.
import java.io.*;
import java.util.*;
import java.math.BigInteger;
public class Main {
public static void main(String[] args) {
InputReader in = new InputReader(System.in);
PrintWriter w = new PrintWriter(System.out);
long x = in.nextLong() ;
long ans = x / 11;
ans += ans;... | Main.java:15: error: 'else' without 'if'
else if (x % 11 > 0)
^
1 error
|
s672833329 | p03817 | C++ | HelloWorld | a.cc:1:1: error: 'HelloWorld' does not name a type
1 | HelloWorld
| ^~~~~~~~~~
|
s250591027 | p03817 | C++ | HelloWorld | a.cc:1:1: error: 'HelloWorld' does not name a type
1 | HelloWorld
| ^~~~~~~~~~
|
s616532214 | p03817 | C++ | #include <stdio.h>
typedef long long unsigned int u64;
// Minimize 6x + 5y >= n. x == y, so 11x >= n, or x == y + 1, 11x - 5 >= n.
u64 solve(u64 n) {
u64 bestresult = 1e15;
// Case 1:
u64 x = (n + 10) / 11;
bestresult = min(bestresult, 2 * x);
// Case 2:
x = (n + 15) / 11;
bestresult = min(bestresult, 2 ... | a.cc: In function 'u64 solve(u64)':
a.cc:10:16: error: 'min' was not declared in this scope
10 | bestresult = min(bestresult, 2 * x);
| ^~~
|
s758379429 | p03817 | C | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include ... | main.c:1:10: fatal error: algorithm: No such file or directory
1 | #include <algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s105555321 | p03817 | C++ | #include<iostream>
using namespace std;
bool T[100000];
int main(void){
int N;
cin >> N ;
int cnt=0;
int k=0
for (int i=0; i<N; i++){
int j;
cin >>j;
if (T[j]) k++;
else{T[j]=true; cnt++;}
}
cout << k%2 == 0 ? cnt : cnt-1 << endl;
return 0 ;
} | a.cc: In function 'int main()':
a.cc:10:1: error: expected ',' or ';' before 'for'
10 | for (int i=0; i<N; i++){
| ^~~
a.cc:10:15: error: 'i' was not declared in this scope
10 | for (int i=0; i<N; i++){
| ^
a.cc:16:13: error: no match for 'operator==' (operand types are 'std::basic_ostre... |
s072127751 | p03817 | C++ | #include<iostream>
using namespace std;
bool T[100000];
int main(void){
int N;
cin >> N ;
int cnt=0;
int k=0
for (int i=0; i<N; i++){
int j;
cin >>j;
if (T[j]) k++
else{T[j]=true; cnt++;}
}
cout << k%2 == 0 ? cnt : cnt-1 << endl;
return 0 ;
} | a.cc: In function 'int main()':
a.cc:10:1: error: expected ',' or ';' before 'for'
10 | for (int i=0; i<N; i++){
| ^~~
a.cc:10:15: error: 'i' was not declared in this scope
10 | for (int i=0; i<N; i++){
| ^
a.cc:16:13: error: no match for 'operator==' (operand types are 'std::basic_ostre... |
s475256534 | p03817 | C++ | #include <bits/stdc++.h>
#define mem(a, b) memset(a, b, sizeof(a))
#define inf (1e9 + 7)
#define pi acos(-1)
#define eps 0.000001
using namespace std;
__int64 x;
int main()
{
__int64 ans = 0;
scanf("%I64d", &x);
ans += x / 11 * 2;
x %= 11;
if(x > 6)
ans += 2;
else if(x)
ans += ... | a.cc:8:1: error: '__int64' does not name a type; did you mean '__int64_t'?
8 | __int64 x;
| ^~~~~~~
| __int64_t
a.cc: In function 'int main()':
a.cc:12:5: error: '__int64' was not declared in this scope; did you mean '__ynf64'?
12 | __int64 ans = 0;
| ^~~~~~~
| __ynf64
a.cc:13... |
s230849516 | p03817 | C++ | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println((long)Math.ceil(in.nextLong()/5.5));
}
}
| a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.util.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: ... |
s900460495 | p03817 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
long long int n;
int main()
{
long long int ans,temp;
cin>>n;
ans=n/11;
temp=n-11*ans;
if(temp==0) cout<<ans<<endl;
else if(temp<=6) count<<ans+1<<endl;
else cout<<ans<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:23: error: invalid operands of types '<unresolved overloaded function type>' and 'long long int' to binary 'operator<<'
12 | else if(temp<=6) count<<ans+1<<endl;
| ~~~~~^~~~~~~
|
s834705472 | p03817 | C | #include<stdio.h>
int main(void){
long x,count;
scanf("%ld",&x);
count = (x-x%11)/11;
count *= 2;
if(x%11 != 0)count++;
if(x%11 > 6)count++;
}
printf("%ld",count);
return 0;
} | main.c:12:12: error: expected declaration specifiers or '...' before string constant
12 | printf("%ld",count);
| ^~~~~
main.c:12:18: error: unknown type name 'count'
12 | printf("%ld",count);
| ^~~~~
main.c:14:5: error: expected identifier or '(' before 'return'
... |
s312237270 | p03817 | C++ | test | a.cc:1:1: error: 'test' does not name a type
1 | test
| ^~~~
|
s560012438 | p03817 | C++ | Umi | a.cc:1:1: error: 'Umi' does not name a type
1 | Umi
| ^~~
|
s768127105 | p03817 | C++ | #include <stdio.h>
#include <iostream>
#include <queue>
#include <string>
#include <algorithm>
#include <cstdio>
#include <stack>
#include <vector>
#include <map>
#include <string.h>
#define inf 0x7fffffff
using namespace std;
//1232
int a,b,c,n,m,l[100000110],o[10010],k,i,d,dx[10]={0,1,-1,0,0,-1,-1,1,1},dy[10]={0,0,0,... | a.cc:16:1: error: '__int64' does not name a type; did you mean '__int64_t'?
16 | __int64 ert;
| ^~~~~~~
| __int64_t
|
s149722224 | p03817 | Java | import com.teamlab.vm.controllers.admin.system.SystemController;
import java.util.Scanner;
public class Main {
public static final void main(String args[]) {
new Main().solve();
}
void solve() {
try (Scanner in = new Scanner(System.in)) {
long x = in.nextLong();
l... | Main.java:1: error: package com.teamlab.vm.controllers.admin.system does not exist
import com.teamlab.vm.controllers.admin.system.SystemController;
^
1 error
|
s477160984 | p03817 | Java | import java.io.*;
public class Team_Project01 {
static final int N = 10000;
public static void main(String[] args) throws IOException {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
long x=Long.parseLong(br.readLine());
long sum=x/11;
long temp=x%11;
... | Main.java:3: error: class Team_Project01 is public, should be declared in a file named Team_Project01.java
public class Team_Project01 {
^
1 error
|
s862761553 | p03817 | Java | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
const int MM = 1e9 + 7;
const double eps = 1e-8;
const int MAXN = 2e6 + 10;
int n, m;
void prework(){
}
void read(){
}
int K;
ll C[2222][2222];
ll pw[2222];
ll f[2222][2222];
ll sum[2222][2222];
void solve(int casi)... | Main.java:1: error: illegal character: '#'
#include<bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<bits/stdc++.h>
^
Main.java:5: error: class, interface, enum, or record expected
typedef long long ll;
^
Main.java:6: error: class, interface, enum, or record expected
type... |
s537912238 | p03817 | C++ | a = input()
print a / 11 * 2 + a % 11 / 6 + 1
| a.cc:1:1: error: 'a' does not name a type
1 | a = input()
| ^
|
s182760846 | p03817 | C | #include <stdio.h>
int main(){
long long int x,a;
scanf("%lld",&x);
a = 2x / 11;
if(2*x%11!=0)a++;
printf("%lld",a);
return 0;
} | main.c: In function 'main':
main.c:5:13: error: invalid suffix "x" on integer constant
5 | a = 2x / 11;
| ^~
|
s456645519 | p03817 | C++ | #include <iostream>
using namespace std;
//#define int long long
#define CHOOSE(a) CHOOSE2 a
#define CHOOSE2(a0,a1,a2,a3,x,...) x
#define REP1(i, s, cond, cal) for (signed i = signed(s); i cond; i cal)
#define REP2(i, s, n) REP1(i, s, < signed(n), ++)
#define REP3(i, n) REP2(i, 0, n)
#define rep(...) CHOOSE((__VA_ARG... | a.cc:24:12: error: 'vector' does not name a type
24 | using VV = vector<vector<int>>;
| ^~~~~~
a.cc:25:11: error: 'vector' does not name a type
25 | using V = vector<int>;
| ^~~~~~
a.cc:30:13: error: variable or field 'input' declared void
30 | inline void input(vector<T>& v) {... |
s263265474 | p03817 | C++ | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
using namespace std;
//repetition
#define FOR(i,a,b) for(int i=(a);... | a.cc: In function 'int main(int, char**)':
a.cc:37:10: error: invalid operands of types 'double' and 'int' to binary 'operator%'
37 | if (x%11 <= 6)
| ~^~~
| | |
| | int
| double
|
s680284958 | p03817 | C++ | #define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
void main() {
//6+5+6+5+6+5+......が最速のはず。
long long int needpoint = 0;
long long int i = 0;
int jouyo = 0;
scanf("%lld",&needpoint);
i = (needpoint / 11) * 2;
jouyo = needpoint % 11;
if (jouyo > 0) { i++; }
if (jouyo > 6) { i++; }
printf("%lld",... | a.cc:6:1: error: '::main' must return 'int'
6 | void main() {
| ^~~~
a.cc: In function 'int main()':
a.cc:21:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
21 | return;
| ^~~~~~
|
s993505609 | p03817 | C++ | #include <iostream>
#include <cstdio>
#include <string>
using namespace std;
int main(void) {
long long ans = 0;
long long x, remain;
cin >> x;
ans = std::max((long long)0,long long(x-11))/11;
remain = x - (ans*11);
ans *= 2;
while (remain > 0) {
remain -= 6;
ans++;
if (remain <= 0) break;
remain -... | a.cc: In function 'int main()':
a.cc:12:37: error: expected primary-expression before 'long'
12 | ans = std::max((long long)0,long long(x-11))/11;
| ^~~~
|
s006749080 | p03817 | C++ | #include <iostream>
#include <cstdio>
#include <string>
using namespace std;
int main(void) {
long long ans = 0;
long long x;
cin >> x;
ans = (long long)(std::max((long long)0,long long(x-11))/11);
long long remain = x - (ans*11);
ans *= 2;
while (remain > 0) {
remain -= 6;
ans++;
if (remain <= 0) br... | a.cc: In function 'int main()':
a.cc:12:49: error: expected primary-expression before 'long'
12 | ans = (long long)(std::max((long long)0,long long(x-11))/11);
| ^~~~
|
s760451320 | p03817 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <bitset>
#include <fstream>
#include <sstream>
#include <string>
#include <time.h>
#include <math.h>
using namespace std;
int main() {
long long double x;
cin >> x;
long long int ans;
ans = ceil(x/11*2);
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:14:8: error: 'long long' specified with 'double'
14 | long long double x;
| ^~~~
|
s899031888 | p03817 | C++ | #include "bits/stdc++.h"
using namespace std;
int main()
{
ll x;
cin >> x;
map<int, int> m;
for(int i = 1; i <= 6; i++)m[i] = 1;
for(int i = 7; i <= 11; i++)m[i] = 2;
if(x >= 1 && x <= 11)cout << m[x];
else {
ll divv = x/11;
divv += m[x%11];
cout << divv;
}
r... | a.cc: In function 'int main()':
a.cc:6:5: error: 'll' was not declared in this scope
6 | ll x;
| ^~
a.cc:7:12: error: 'x' was not declared in this scope
7 | cin >> x;
| ^
a.cc:13:11: error: expected ';' before 'divv'
13 | ll divv = x/11;
| ^~~~~
... |
s333387780 | p03817 | C++ | #include <iostream>
#include <cstdio>
#include <string>
using namespace std;
int main(void) {
long long ans = 0;
long long x;
cin >> x;
ans = (long long)(std::max((long long)0,long long(x-11))/11);
long long remain = x - (ans*11);
ans *= 2;
while (remain > 0) {
remain -= 6;
ans++;
if (remain <= 0) br... | a.cc: In function 'int main()':
a.cc:12:49: error: expected primary-expression before 'long'
12 | ans = (long long)(std::max((long long)0,long long(x-11))/11);
| ^~~~
|
s897836514 | p03817 | C++ | 149696127901 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 149696127901
| ^~~~~~~~~~~~
|
s076419939 | p03817 | C++ | x = int(input())
print(x//11*2 + (x%11//6+1))
| a.cc:1:1: error: 'x' does not name a type
1 | x = int(input())
| ^
|
s917568622 | p03818 | C++ | #pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
//#define BOOST
#ifdef BOOST
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp... | a.cc:4:10: fatal error: atcoder/all: No such file or directory
4 | #include <atcoder/all>
| ^~~~~~~~~~~~~
compilation terminated.
|
s879029460 | p03818 | C++ | # This code is generated by [Atcoder_base64](https://github.com/kyomukyomupurin/AtCoder_base64)
import base64
import subprocess
exe_bin = "e??420s#R400000000000{}h%0RR91@C^U}00000KmY&$00000U@rgw0000000000Kma%Z2>?I<9snHx1^@s61ONa4KmY&$00000KmY&$00000KmY&$00000_yGU_00000_yGU_000002mk;8000000{{R31ONa4I066w00000I066w0000... | a.cc:1:3: error: invalid preprocessing directive #This
1 | # This code is generated by [Atcoder_base64](https://github.com/kyomukyomupurin/AtCoder_base64)
| ^~~~
a.cc:8:17: warning: multi-character character constant [-Wmultichar]
8 | open("./kyomu", 'wb').write(base64.b85decode(exe_bin))
| ... |
s093498904 | p03818 | C++ | #include <iostream>
#include <vector>
#include <deque>
#include <algorithm>
#include <numeric>
#include <string>
#include <cstring>
#include <list>
#include <unordered_set>
#include <tuple>
#include <cmath>
#include <limits>
#include <type_traits>
#include <iomanip>
#include <map>
#include <unordered_map>
#include <que... | a.cc:135:14: error: redefinition of 'const double pi'
135 | const double pi = acos(-1.0);
| ^~
a.cc:30:14: note: 'const double pi' previously defined here
30 | const double pi = acos(-1.0);
| ^~
a.cc:136:10: error: redefinition of 'const ll MOD'
136 | const ll MOD = 10000000... |
s569199495 | p03818 | C++ |
6
7
8
9
10
11
12
13
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
int n;cin>>n;
vector<int> a(n);
for(int i=0;i<n;i++) cin>>a[i];
set<int> s(a.begin(),a.end());
int k=s.size();
if((n-k)%2==0) cout<<k<<endl;
else cout<<k-1<<endl;
} | a.cc:2:1: error: expected unqualified-id before numeric constant
2 | 6
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:10:
/usr/... |
s695273257 | p03818 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
ll k;
cin >> k;
for (int i = 0; i < s.length(); i++) {
int x = 'z' - s.at(i) + 1;
if (x <= k) {
s.at(i) = 'a';
k -= x;
}
}
if (k == 0) {
cout << s << endl;
break;
}
s.at(s.length() - 1) = s.at(... | a.cc: In function 'int main()':
a.cc:19:17: error: break statement not within loop or switch
19 | break;
| ^~~~~
|
s521628880 | p03818 | Java | from collections import Counter
n,*a = map(int,open(0).read().split())
c = Counter(a)
b = 0
for i in c.values():
b+=i-1
if b%2 != 0:
b+=1
print(n-b) | Main.java:1: error: class, interface, enum, or record expected
from collections import Counter
^
1 error
|
s351865506 | p03818 | C++ | #include <bits/stdc++.h>
using namespace std;
using lint = long long;
signed main(){
lint N; cin >> N;
set<lint> SET;
for(lint i = 0; i < N; i++){
lint x; cin >> x;
SET.insert(x);
}
lint N = SET.size();
if(N % 2 == 1) cout << N << endl;
else cout << N - 1 << endl;
} | a.cc: In function 'int main()':
a.cc:12:14: error: redeclaration of 'lint N'
12 | lint N = SET.size();
| ^
a.cc:6:14: note: 'lint N' previously declared here
6 | lint N; cin >> N;
| ^
|
s308755135 | p03818 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n; cin>>n;
map<int,int> m;
rep(i,n) {
int t; cin >> t;
m[t]++;
}
if((n-m.size())%2){
cout << m.size()-1;
}else{
cout << m.size();
}
} | a.cc: In function 'int main()':
a.cc:7:13: error: 'i' was not declared in this scope
7 | rep(i,n) {
| ^
a.cc:7:9: error: 'rep' was not declared in this scope
7 | rep(i,n) {
| ^~~
|
s205289635 | p03818 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n,te;
cin >> n;
vector<int> a(n);
set<int> s;
for(int i=0;i<n;i++){
cin >> a.at(i);
s.insert(a.at(i));
}
te=s.size();
if(s.size%2){
te++;
}
int ans=n-te;
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:15:10: error: invalid use of member function 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::size() const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?)
15 | ... |
s383508481 | p03818 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
vector<int> a(n);
set<int> s;
for(int i=0;i<n;i++){
cin >> a.at(i)
s.insert(a.at(i));
}
int ans=n-s.size();
if(ans%2){
ans++;
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before 's'
10 | cin >> a.at(i)
| ^
| ;
11 | s.insert(a.at(i));
| ~
|
s148281808 | p03818 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n ; cin >> n ;
map<int,int> card;
rep(i,n) {
int num ; cin >> num ;
card[num]++;
}
int kind=0 , zero = 0;
for (auto x : card){
if(x.second % 2 == 0 ) zero ++;
kind ++;
}
if(zero%2==0)cout<<kind<<endl;
else cout <<kind-1<<endl;
} | a.cc: In function 'int main()':
a.cc:7:5: error: 'i' was not declared in this scope
7 | rep(i,n) {
| ^
a.cc:7:1: error: 'rep' was not declared in this scope
7 | rep(i,n) {
| ^~~
|
s829334570 | p03818 | C++ | #include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cstring>
#define REP(i, n) for (long long i = 0; i < (n); i++)
//#define ll long long
#define ll int
using namespace std;
//操作:任意のカードを3枚抜き出し、最大と最小を取り除く
//残ったカードが互いに異なるようにするには、最小で何回操作を行えばよいか
... | a.cc:40:2: error: expected unqualified-id before numeric constant
40 | 3 5 2 8 6 11 1
| ^
|
s912472525 | p03818 | C++ | // https://atcoder.jp/contests/arc068/tasks/arc068_b
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i, n) FOR(i, 0, n)
#define FOR(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; ++i)
#define ALL(obj) (obj).begin(), (obj).end()
#define ALLR(obj) (obj).rbegin(), (obj).rend()
#def... | a.cc: In function 'int main()':
a.cc:109:32: error: no match for 'operator<<' (operand types are '{anonymous}::MaiPrinter' and '<unresolved overloaded function type>')
109 | cout << sz - (sz % 2 == 0) << endl;
| ^
a.cc:65:24: note: candidate: '{anonymous}::MaiPrinter& {anonymo... |
s333490072 | p03818 | C++ | #include<iostream>
#include<fstream>
#include<bitset>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
#include<map>
#include<set>
#include<iomanip>
#include<queue>
#include<stack>
#include<numeric>
#include<utility>
#include<regex>
#include<climits>
#include "Source.h"
void Init() {
std::cin.tie... | a.cc:17:10: fatal error: Source.h: No such file or directory
17 | #include "Source.h"
| ^~~~~~~~~~
compilation terminated.
|
s597201497 | p03818 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define fi first
#define se second
#define co(a) cout<<a<<endl
#define sz size
#define bgn begin()
#define en end()
#define pb(a) push... | a.cc: In function 'int main()':
a.cc:10:12: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = long long int; _Alloc = std::allocator<long long int>; size_type = long unsigned int]' (did you forget the '()' ?)
10 | #define sz size
| ... |
s687279587 | p03818 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
long long N,ans,ans2;
cin>>N;
ans=0;
nector<long long>a(N),b(100001);
for(int i=0;i<100001;i++){
b[i]=0;
}
for(int i=0;i<N;i++){
cin>>a[i];
b[a[i]]++;
if(b[a[i]]==1){
ans2++;
}
}
if(ans2%2==0){
ans2--;
}
cout<<ans2<<en... | a.cc: In function 'int main()':
a.cc:8:3: error: 'nector' was not declared in this scope
8 | nector<long long>a(N),b(100001);
| ^~~~~~
a.cc:8:10: error: expected primary-expression before 'long'
8 | nector<long long>a(N),b(100001);
| ^~~~
a.cc:10:4: error: 'b' was not declared in this... |
s284693758 | p03818 | C++ | #include <iostream>
#include <algorithm>
#include <set>
using namespace std;
int main() {
int n;
cin >> n;
set<int> s;
for (int i=0; i<n; i++) {
int a; cin >> a;
s.insert(a);
}
cout << max(1, (s.size()+1)/2*2-1) << '\n';
return 0;
} | a.cc: In function 'int main()':
a.cc:15:16: error: no matching function for call to 'max(int, std::set<int>::size_type)'
15 | cout << max(1, (s.size()+1)/2*2-1) << '\n';
| ~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/b... |
s325596966 | p03818 | C++ | #pragma region include
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <string>
#include <queue>
#include <stack>
#include <cmath>
#include <set>
#include <cstdio>
#define ALL(obj) (obj).begin(),(obj).end()
#define RALL(obj) (obj).rbegin(),(obj).rend()
#define REP(i, n) for(int i = 0;... | a.cc: In function 'int main()':
a.cc:77:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
77 | scanf_s("%d", &a);
| ^~~~~~~
| scanf
|
s151336627 | p03818 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
vector<int> A(100001);
int a;
for(int i = 0;i < n;i++){
cin >> a;
A[a]++;
}
int even = 0;
int odd = 0;
for(int i = 0;i < 100001;i++){
if(a[i] % 2 == 0 && a[i] > 0)even++;
else odd++;
}
int ans = odd + even -... | a.cc: In function 'int main()':
a.cc:15:9: error: invalid types 'int[int]' for array subscript
15 | if(a[i] % 2 == 0 && a[i] > 0)even++;
| ^
a.cc:15:26: error: invalid types 'int[int]' for array subscript
15 | if(a[i] % 2 == 0 && a[i] > 0)even++;
| ^
|
s313798158 | p03818 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin > n;
vector<int> A(100001);
int a;
for(int i = 0;i < n;i++){
cin >> a;
A[a]++;
}
int even = 0;
int odd = 0;
for(int i = 0;i < 100001;i++){
if(a[i] % 2 == 0 && a[i] > 0)even++;
else odd++;
}
int ans = odd + even - ... | a.cc: In function 'int main()':
a.cc:5:7: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
5 | cin > n;
| ~~~ ^ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:5:7: note: candidate: 'operator>(i... |
s866120342 | p03818 | C++ | #include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>
#include<cstring>
#include<string>
#include<iomanip>
#include<map>
#include<fstream>
#include<queue>
#include<windows.h>
#include<stack>
using namespace std;
int a[100010];
int main()
{
int n, t, c;
cin >> n;
for (int i = 0; i < n; i++) {
... | a.cc:11:9: fatal error: windows.h: No such file or directory
11 | #include<windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s415924577 | p03818 | C++ | #include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>
#include<cstring>
#include<string>
#include<iomanip>
#include<map>
#include<fstream>
#include<queue>
#include<windows.h>
#include<stack>
//#include"big_integers.h"
using namespace std;
int a[100010];
int main()
{
int n, t, c;
cin >> n;
for (... | a.cc:11:9: fatal error: windows.h: No such file or directory
11 | #include<windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s385933106 | p03818 | C++ | #include<bits/stc++.h>
using namespace std;
int main(){
int n; cin >> n;
vector<int> a(n),v(100005); for(int i=0;i<n;i++) cin >> a[i];
for(int i=0;i<n;i++) v[a[i]]++;
int count=0, even=0;
for(int i=1;i<100005;i++){
if(v[i]>0){
count++;
if(v[i]%2==0) even++;
}
}
cout << count - even%2 <... | a.cc:1:9: fatal error: bits/stc++.h: No such file or directory
1 | #include<bits/stc++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s953793332 | p03818 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
int n, a[100005], ans, cnt;
map<char, int> mp;
signed main()
{
cin >> n;
for(int i = 0; i < n; i++){
cin >> a[i];
mp[a[i]]++;
}
map<char, int> :: iterator ite;
for(ite = mp.begin(); ite != mp.end(); ite++){
... | a.cc: In function 'int main()':
a.cc:22:13: error: 'res' was not declared in this scope
22 | res++;
| ^~~
a.cc:25:19: error: 'res' was not declared in this scope
25 | if(cnt % 2 && res > 0){
| ^~~
|
s984512776 | p03818 | C++ | #include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1e9+7
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
using namespace std;
int main(){
int n;cin>>n;
vector<int>num(1e5+10);
for(int i=0;i<n;i++){
int a;cin>>a;
num[a]++;
}
sort(num... | a.cc: In function 'int main()':
a.cc:30:15: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
30 | cout<ans-cnt<<endl;
| ~~~~~~~^~~~~~
|
s512311592 | p03818 | C++ | #import<iostream>
main(){int n,c,i,a[1<<17]={};for(std::cin>>n;n--;){std::cin>>i;c+=!a[i]++;}for(i=1<<17;i--;)n^=~a[i]&1;std::cout<<n&1?c-1:c;} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<iostream>
| ^~~~~~
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){int n,c,i,a[1<<17]={};for(std::cin>>n;n--;){std::cin>>i;c+=!a[i]++;}for(i=1<<17;i--;)n^=~a[i]&1;std::cout... |
s733500355 | p03818 | C++ | #import<iostream>
main(int n,c,i,a[1<<17]={}){for(std::cin>>n;n--;){std::cin>>i;c+=!a[i]++;}for(i=1<<17;i--;)n^=~a[i]&1;std::cout<<n&1?c-1:c;} | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<iostream>
| ^~~~~~
a.cc:2:12: error: 'c' has not been declared
2 | main(int n,c,i,a[1<<17]={}){for(std::cin>>n;n--;){std::cin>>i;c+=!a[i]++;}for(i=1<<17;i--;)n^=~a[i]&1;std::cout<<n&1?c-1:c;}
| ^
a.cc:2:1... |
s653637412 | p03818 | C++ | #include <iostream>
#include <cstdlib>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#define p pair <int,int>
#define rep(i,n) for(int i=0;i<n;i++)
typedef long long ll;
using namespace std;
int n,buckets[100005];
vector<int> sorted;
vector<int>::iterator it;
int main(int argc... | a.cc: In function 'int main(int, const char**)':
a.cc:47:6: error: expected '}' at end of input
47 | }
| ^
a.cc:16:1: note: to match this '{'
16 | {
| ^
|
s146572839 | p03818 | C++ | #include<bits\stdc++.h>
using namespace std;
int N;
int C[100010] = {0};
int K = 0;
int sum = 0;
int main()
{
scanf("%d",&N);
for(int i = 0; i < N; i++)
{
int A;
scanf("%d",&A);
if(C[A] == 0)
{
K++;
}
C[A]++;
}
for(int i = 1; i < N + 1; i... | a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory
1 | #include<bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s115443247 | p03818 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int n;
cin >> n;
vector<int> vs(n);
for(int i = 0; i < n; i++){
cin >> vs[i];
}
sort(vs.begin(), vs.end());
vs.erase(unique(vs.begin(), vs.end()), vs.end());
int dup = n - vs.size();
if(dup % 2 == 0) {
cout << n - dup ... | a.cc: In function 'int main()':
a.cc:11:3: error: 'vector' was not declared in this scope
11 | vector<int> vs(n);
| ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
2 | #include <algorithm>
+++ |+#include <vector>
3 |
a.... |
s908264159 | p03818 | C++ | n=int(input())
a=[int(i) for i in input().split()]
a.sort()
b=[a[0]]
def f(i):
if i==n:
print(len(b))
return 0
if a[i]!=b[-1]:
b.append(a[i])
f(i+1)
else:
f(i+2)
f(1) | a.cc:1:1: error: 'n' does not name a type
1 | n=int(input())
| ^
|
s559711970 | p03818 | C++ | #include<iostream>
using namespace std;
bool T[100000];
int main(void){
int N;
cin >> N ;
int cnt=0;
int k=0;
for (int i=0; i<N; i++){
int j;
cin >>j;
if (T[j]) k++;
else{T[j]=true; cnt++;}
}
cout << k%2 == 0 ? cnt : cnt-1 << endl;
return 0 ;
} | a.cc: In function 'int main()':
a.cc:16:13: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'int')
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ~~~~~~~~~~~ ^~ ~
| | |
| | int
| std::basic_ostream<char>
a.cc:16:13: note: candi... |
s025452710 | p03818 | C++ | //
// main.cpp
// atc-reg68-D
//
// Created by 岩井聡 on 2017/02/10.
// Copyright © 2017年 岩井聡. All rights reserved.
//
#include <iostream>
#include <stdlib.h>
int n;
int map[100001];
int main(int argc, const char * argv[]) {
// freopen("/Volumes/4HOPE/Dropbox/17Todai/CodeJam/R1C-2015-C/in.txt","r",stdin);
... | a.cc: In function 'int main(int, const char**)':
a.cc:22:5: error: 'memset' was not declared in this scope
22 | memset(map,0,sizeof(map));
| ^~~~~~
a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
10 | #include <stdlib.h>
+++ |+#in... |
s197530826 | p03818 | C++ | //
// main.cpp
// atc-reg68-D
//
// Created by 岩井聡 on 2017/02/10.
// Copyright © 2017年 岩井聡. All rights reserved.
//
#include <iostream>
int n;
int solve(void);
int map[100001];
int main(int argc, const char * argv[]) {
// freopen("/Volumes/4HOPE/Dropbox/17Todai/CodeJam/R1C-2015-C/in.txt","r",stdin);
... | a.cc: In function 'int main(int, const char**)':
a.cc:22:5: error: 'memset' was not declared in this scope
22 | memset(map,0,sizeof(map));
| ^~~~~~
a.cc:10:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
9 | #include <iostream>
+++ |+#in... |
s537336250 | p03818 | C++ | arc068_b | a.cc:1:1: error: 'arc068_b' does not name a type
1 | arc068_b
| ^~~~~~~~
|
s008080250 | p03818 | C++ | #include<cstdio>
#include<algorithm>
#include<map>
using namespace std;
int n,i,x;
map<int,int>mp;
int main()
{
scanf("%d",&n);
for (i=1;i<=n;++i) scanf("%d",&x),mp[x]++;
for (map<int,int>::iterator it=mp.begin();it!=mp.end();++it)
ans+=it->se-1;
printf("%d\n",n-ans-(ans%2));
} | a.cc: In function 'int main()':
a.cc:16:10: error: 'ans' was not declared in this scope; did you mean 'abs'?
16 | ans+=it->se-1;
| ^~~
| abs
a.cc:16:19: error: 'struct std::pair<const int, int>' has no member named 'se'
16 | ans+=it->se-1;
| ... |
s168044730 | p03818 | C++ | #include<cstdio>
#include<algorithm>
#include<map>
using namespac std;
int n,i,x;
map<int,int>mp;
int main()
{
scanf("%d",&n);
for (i=1;i<=n;++i) scanf("%d",&x),mp[x]++;
for (map<int,int>::iterator it=mp.begin();it!=mp.end();++it)
ans+=it->se-1;
printf("%d\n",n-ans-(ans%2));
} | a.cc:5:7: error: expected nested-name-specifier before 'namespac'
5 | using namespac std;
| ^~~~~~~~
a.cc:9:1: error: 'map' does not name a type
9 | map<int,int>mp;
| ^~~
a.cc: In function 'int main()':
a.cc:14:41: error: 'mp' was not declared in this scope
14 | for (i=1;i<=n;++i) sca... |
s335999583 | p03818 | C++ | #include <bits/stdc++.h>
using namespace std;
vector<long long> A;
long long n;
long long pairs = 0;
bool whatever(vector<long long> some) {
for (long long i = 0; i < n; ++i) {
int t = A[i];
for (long long ii = 0; ii < n; ++ii) {
if (i != ii && t == A[ii]) {
++pairs;
A.erase(i);
A.erase(ii);
r... | a.cc: In function 'bool whatever(std::vector<long long int>)':
a.cc:14:40: error: no matching function for call to 'std::vector<long long int>::erase(long long int&)'
14 | A.erase(i);
| ~~~~~~~^~~
In file included from /usr/include/c++/14/vector:6... |
s925520311 | p03818 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <fstream>
#include <string>
#include <sstream>
#include <math.h>
#include <set>
#include <map>
using namespace std;
#define rep(i,n) for(int i = 0; i < n ; i++)
#define pb push_back
static const int INF = 1000000;
static const int MAX = 100001;
typede... | a.cc: In function 'int main()':
a.cc:24:3: error: 'memset' was not declared in this scope
24 | memset(cnt,0,sizeof(cnt));
| ^~~~~~
a.cc:10:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
9 | #include <map>
+++ |+#include <cstring>
10 | us... |
s472527969 | p03818 | C++ | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
using namespace std;
//repetition
#define FOR(i,a,b) for(int i=(a);... | a.cc: In function 'int main(int, char**)':
a.cc:83:1: error: jump to label 'end'
83 | end:
| ^~~
a.cc:48:14: note: from here
48 | goto end;
| ^~~
a.cc:75:9: note: crosses initialization of 'int ans'
75 | int ans = 0;
| ^~~
|
s366237382 | p03818 | C++ | #include <iostream>
#include <vector>
#define pb push_back
using namespace std;
int na[111111];
int use[111111];
int main(void){
int i,n,x;
int m;
int res;
vector<int> a;
cin>>n;
for(i=0;i<n;i++){
cin>>x;
a.pb(x);
na[x]++;
}
sort(a.begin(),a.end());
res=m=0;
for(i=0;i<n;i++){
if(us... | a.cc: In function 'int main()':
a.cc:19:3: error: 'sort' was not declared in this scope; did you mean 'short'?
19 | sort(a.begin(),a.end());
| ^~~~
| short
|
s065286671 | p03818 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <bitset>
#include <fstream>
#include <sstream>
#include <string>
#include <time.h>
#include <math.h>
#include <set>
using namespace std;
int main() {
int n;
set<int> st;
cin >> n;
int a;
for(int i=0;i<n;i++) {
cin >> a;
st.insert(a)... | a.cc: In function 'int main()':
a.cc:23:10: error: missing template arguments before '.' token
23 | a = set.size();
| ^
|
s053748385 | p03818 | C++ | #include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
map<int, int>m;
int main(){
int n;
int x;
cin >> n;
for(int i = 0; i < n; i++){
cin >> x;
m[x]++;
}
priority_queue<int>Q;
for(auto it:m)
Q.pus... | a.cc: In function 'int main()':
a.cc:24:20: error: 'a' was not declared in this scope
24 | if(Q.size() == a){
| ^
a.cc:25:11: error: redeclaration of 'int a'
25 | int a = Q.top();
| ^
a.cc:24:20: note: '<typeprefixerror>a' previously declared here
24 | if(... |
s806630115 | p03818 | C++ | int N, d;
bool seen[100005];
int main() {
scanf("%d", &N);
for (int i = 0, n; i < N; i++) {
scanf("%d", &n);
if (seen[n]) d++;
seen[n] = 1;
}
printf("%d\n", N - d - (d&1));
} | a.cc: In function 'int main()':
a.cc:5:5: error: 'scanf' was not declared in this scope
5 | scanf("%d", &N);
| ^~~~~
a.cc:11:5: error: 'printf' was not declared in this scope
11 | printf("%d\n", N - d - (d&1));
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is... |
s621015315 | p03819 | C++ | #include <bits/stdc++.h>
#define reg register
using namespace std;
const int N=300010;
int n,m,ql,qr,ans[N];
int read()
{
int d=0; char ch=getchar();
while (!isidigt(ch)) ch=getchar();
while (isdigit(ch)) d=(d<<3)+(d<<1)+ch-48,ch=getchar();
return d;
}
int main()
{
m=read(); n=read();
while (m--)
{
ql=read(... | a.cc: In function 'int read()':
a.cc:11:17: error: 'isidigt' was not declared in this scope; did you mean 'isxdigit'?
11 | while (!isidigt(ch)) ch=getchar();
| ^~~~~~~
| isxdigit
a.cc: In function 'int main()':
a.cc:22:30: warning: ISO C++17 does not allow 'registe... |
s797442397 | p03819 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <queue>
#define mp make_pair
#define pb push_back
#define x first
#define y second
#define FOR(i, a, b) for(int i=a, _n=b; i<=_n; ++i)
using namespace std;
const int N = 1e5+5, open = -1e7, close = 1e7;
int n, m, ans[N], bit[N];
vec... | a.cc: In function 'int main()':
a.cc:35:19: error: 'sqrt' was not declared in this scope
35 | FOR(j, 2, sqrt(m)) if (l <= r/j*j) ans[j] += 1;
| ^~~~
a.cc:11:38: note: in definition of macro 'FOR'
11 | #define FOR(i, a, b) for(int i=a, _n=b; i<=_n; ++i)
| ... |
s324337110 | p03819 | C++ | #include <bits/stdc++.h>
#define lowbit(x) (x & -x)
using namespace std;
// 数组开小了 /kk
const int _ = 3e5 + 10;
int N, M, d;
struct node {
int l, r, len;
} a[_];
struct BIT {
int c[_];
void insert(int x, int y) {
for ( ; x <= M + 1; x += lowbit(x)) c[x] += y;
}
int query(int x) {
int y = 0;
for ( ; x; x -= l... | a.cc:22:6: error: extended character
is not valid in an identifier
22 | } tr;
| ^
a.cc:22:6: error: '\U00002028' does not name a type
22 | } tr;
| ^
|
s726019561 | p03819 | C++ | #include <bits/stdc++.h>
#include "../lib/lazysegmenttree/lazy_segtree_add_sum.hpp"
using namespace std;
#define SZ(x) (int)(x.size())
using ll = long long;
using ld = long double;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vll = vector<ll>;
using vvll = vector<vector<ll... | a.cc:2:10: fatal error: ../lib/lazysegmenttree/lazy_segtree_add_sum.hpp: No such file or directory
2 | #include "../lib/lazysegmenttree/lazy_segtree_add_sum.hpp"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s389472206 | p03819 | C++ | #include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<deque>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<un... | a.cc: In function 'void solve()':
a.cc:43:12: error: request for member 'first' in 'ms.std::vector<std::pair<int, std::pair<int, int> > >::operator[](((std::vector<std::pair<int, std::pair<int, int> > >::size_type)j)).std::pair<int, std::pair<int, int> >::first', which is of non-class type 'int'
43 | #define fr firs... |
s897530564 | p03819 | C++ | //code by lynmisakura.wish to be accepted!
/****************************/
#include<iostream>
#include<iomanip>
#include<math.h>
#include<vector>
#include<string>
#include<stack>
#include<queue>
#include<map>
#include<algorithm>
#include<bitset>
#include <climits>
#include<set>
#include<bitset>
using namespace std;
/***... | a.cc:75:1: error: '::main' must return 'int'
75 | ijt main(void) {
| ^~~
|
s116163489 | p03819 | C++ | #include <bits/stdc++.h>
using namespace std;
#define INF 0x7fffffff
#define PI acos(-1.0)
#define MOD 2520
#define E 1e-12
using namespace std;
typedef long long ll;
const int MAXN=500000+5;//最大元素个数
int n,m;//元素个数
int c[MAXN];//c[i]==A[i]+A[i-1]+...+A[i-lowbit(i)+1]
//返回i的二进制最右边1的值
int lowbit(int i)
{
return i&(-i... | a.cc: In function 'int main()':
a.cc:60:32: error: 'cmp' was not declared in this scope; did you mean 'cmp2'?
60 | sort(a+1,a+m+1,cmp);
| ^~~
| cmp2
|
s450224230 | p03819 | C++ | // Aimi >> Konomi Suzuki >> Yui >> Ikimono Gakari >> Garninelia >> Kalafina... dude?
// .... Sempre Amei Você ...
// Sempre amei você
// Mesmo de longe sem te ter
// Você me deu forças para viver
// E ser quem eu queria ser
//
//
// Você nunca verá uma menina como ela
// Mais linda em sentimentos que romance de ... | 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:78:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::_Vector_base<long long int, std::allocator<long ... |
s185514583 | p03819 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <math.h>
using namespace std;
const int MAXN = 3e5 + 10;
int N, M;
struct Node {
int l, r, d;
} A[MAXN];
int tr[MAXN];
inline int lowbit(int x) {
return x & (-x);
}
inline void update(int x, int d) {
for(; x <= N; x += lowbit(x)... | a.cc:40:61: error: stray '\' in program
40 | update(A[k].l, 1); update(A[k].r + 1\, -1);
| ^
a.cc: In function 'int main()':
a.cc:32:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
32 | ... |
s599414668 | p03819 | C++ | #include <bits/stdc++.h>
#define FOR(i, begin, end) for(int i=(begin);i<(end);i++)
#define REP(i, n) FOR(i,0,n)
#define IFOR(i, begin, end) for(int i=(end)-1;i>=(begin);i--)
#define IREP(i, n) IFOR(i,0,n)
#define SORT(a) sort(a.begin(), a.end())
#define REVERSE(a) reverse(a.begin(), a.end())
#define int long long
#defi... | a.cc: In function 'int main()':
a.cc:34:5: error: 'BIT' was not declared in this scope
34 | BIT bit(M + 1), bit2(M + 1);
| ^~~
a.cc:39:9: error: 'bit' was not declared in this scope
39 | bit.add(1, 1);
| ^~~
a.cc:43:44: error: 'bit2' was not declared in this scope
43 | ... |
s158201014 | p03819 | C++ | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <unordered_map>
#inc... | a.cc: In function 'int main()':
a.cc:123:33: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = int; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std... |
s874379834 | p03819 | C++ | #include<vector>
std::vector<int>A[' '];int N,M,S[' '],B,L,R,I;void U(int z,int u){while(z<=N)S[z]+=u,z+=z&-z;}main(){scanf("%d%d",&M,&N);for(;~scanf("%d%d",&L,&R);)A[R-L+1].push_back(L);for(L=1;L<=N;L++){B=M;for(I=L;I<=N;I+=L){R=I;while(R)B+=S[R],R-=R&-R;}for(int u:A[L])U(u,1),U(u+L,-1),M--;printf("%d\n",B);}} | a.cc:2:19: warning: multi-character character constant [-Wmultichar]
2 | std::vector<int>A[' '];int N,M,S[' '],B,L,R,I;void U(int z,int u){while(z<=N)S[z]+=u,z+=z&-z;}main(){scanf("%d%d",&M,&N);for(;~scanf("%d%d",&L,&R);)A[R-L+1].push_back(L);for(L=1;L<=N;L++){B=M;for(I=L;I<=N;I+=L){R=I;while(R)B+=S[R],R-=R&-R;... |
s555906580 | p03819 | C++ | #include <bits/stdc++.h>
std::vector<int> A[' '];
int N, M, S[' '], B, L, R, I;
void U(int z, int u) {
while (z <= N)
S[z] += u, z += z & -z;
}
main() {
for (gets(&I); ~scanf("%d%d", &L, &R);)
M++, A[R - L + 1].push_back(L);
for (L = 1; L <= N; L++) {
B = M;
for (I = L; I <= N; I += L) {
... | a.cc:2:20: warning: multi-character character constant [-Wmultichar]
2 | std::vector<int> A[' '];
| ^~~~~
a.cc:3:13: warning: multi-character character constant [-Wmultichar]
3 | int N, M, S[' '], B, L, R, I;
| ^~~~~
a.cc:8:1: warning: ISO C++ forbids declaration o... |
s615002871 | p03819 | C++ | #include <bits/stdc++.h>
std::vector<int> A[' '];
int N, M, S[' '];
void U(int z, int u) {
while (z <= N)
S[z] += u, z += z & -z;
}
main(B, L, R, I) {
std::cin >> M >> N;
for (I = 1; I <= M; I++)
std::cin >> L >> R, A[R - L + 1].push_back(L);
for (L = 1; L <= N; L++) {
B = M;
for (I = L; I <... | a.cc:2:20: warning: multi-character character constant [-Wmultichar]
2 | std::vector<int> A[' '];
| ^~~~~
a.cc:3:13: warning: multi-character character constant [-Wmultichar]
3 | int N, M, S[' '];
| ^~~~~
a.cc:8:5: error: expected constructor, destructor, or type c... |
s120825412 | p03819 | C++ | #include <bits/stdc++.h>
std::vector<int> A[' '];
int n, m, S[' '], a, l, r, i, d;
void U(int x, int u) {
while (x <= n)
S[x] += u, x += x & -x;
}
int main() {
scanf("%d%d", &m, &n);
for (i = 1; i <= m; i++)
scanf("%d%d", &l, &r), A[r - l + 1].push_back(l);
for (d = 1; d <= n; d++) {
a = m;
... | a.cc:2:20: warning: multi-character character constant [-Wmultichar]
2 | std::vector<int> A[' '];
| ^~~~~
a.cc:3:13: warning: multi-character character constant [-Wmultichar]
3 | int n, m, S[' '], a, l, r, i, d;
| ^~~~~
a.cc: In function 'int main()':
a.cc:16:14: e... |
s128161885 | p03819 | C++ | #include <bits/stdc++.h>
#include <cstring>
#define N 400010
using namespace std;
inline int read()
{
int x=0,f=1; char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1; ch=getchar();}
while(ch>='0'&&ch<='9'){x=x*10+ch-'0'; ch=getchar();}
return x*f;
}
namespace fastIO{
#define BUF_SIZE 100005
#define O... | a.cc: In function 'void fastIO::readln2(char*)':
a.cc:114:34: error: 'gets' was not declared in this scope; did you mean 'getw'?
114 | inline void readln2(char *s){gets(s);}
| ^~~~
| getw
a.cc: In function 'int main()':
a.cc:240:26: war... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.