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,-1,0};
static int[] y8 = {0,1,0,-1,-1,1,1,-1};
static int[] x8 = {1,0,-1,0,1,-1,1,-1};
static long[] F;//factorial
static boolean[] isPrime;
static int[] primes;
static long x;
public static void main(String[] args)
{
x = sc.nextLong();
if(x < 12){
if(x <= 6){
System.out.println(1);
}else{
System.out.println(2);
}
return;
}
long res = (x / 11) * 2;
x -= 11 * res / 2;
res += 2;
if(x <= 6)
{
res--;
}
System.out.println(res);
}
public static long sumMod(long... lar)
{
long sum = 0;
for (long l : lar)
sum = (sum + l % MOD) % MOD;
return sum;
}
/**<h1>指定した値以上の先頭のインデクスを返す</h1>
* <p>配列要素が0のときは、0が返る。</p>
* @return<b>int</b> : 探索した値以上で、先頭になるインデクス
*/
public static int lowerBound(final int[] arr, final int value) {
int low = 0;
int high = arr.length;
int mid;
while (low < high) {
mid = ((high - low) >>> 1) + low; //(low + high) / 2 (オーバーフロー対策)
if (arr[mid] < value) {
low = mid + 1;
} else {
high = mid;
}
}
return low;
}
/**<h1>指定した値より大きい先頭のインデクスを返す</h1>
* <p>配列要素が0のときは、0が返る。</p>
* @return<b>int</b> : 探索した値より上で、先頭になるインデクス
*/
public static int upperBound(final int[] arr, final int value) {
int low = 0;
int high = arr.length;
int mid;
while (low < high) {
mid = ((high - low) >>> 1) + low; //(low + high) / 2 (オーバーフロー対策)
if (arr[mid] <= value) {
low = mid + 1;
} else {
high = mid;
}
}
return low;
}
//次の順列に書き換える、最大値ならfalseを返す
public static boolean nextPermutation(int A[])
{
int len = A.length;
int pos = len - 2;
for (; pos >= 0; pos--)
{
if (A[pos] < A[pos + 1])
break;
}
if (pos == -1)
return false;
//posより大きい最小の数を二分探索
int ok = pos + 1;
int ng = len;
while (Math.abs(ng - ok) > 1)
{
int mid = (ok + ng) / 2;
if (A[mid] > A[pos])
ok = mid;
else
ng = mid;
}
swap(A, pos, ok);
reverse(A, pos + 1, len - 1);
return true;
}
//次の順列に書き換える、最小値ならfalseを返す
public static boolean prevPermutation(int A[])
{
int len = A.length;
int pos = len - 2;
for (; pos >= 0; pos--)
{
if (A[pos] > A[pos + 1])
break;
}
if (pos == -1)
return false;
//posより小さい最大の数を二分探索
int ok = pos + 1;
int ng = len;
while (Math.abs(ng - ok) > 1)
{
int mid = (ok + ng) / 2;
if (A[mid] < A[pos])
ok = mid;
else
ng = mid;
}
swap(A, pos, ok);
reverse(A, pos + 1, len - 1);
return true;
}
//↓nCrをmod計算するために必要。 ***factorial(N)を呼ぶ必要がある***
static long ncr(int n, int r)
{
factorial(n);
return F[n] / (F[n - r] * F[r]);
}
static long modNcr(int n, int r)
{
long result = F[n];
result = result * modInv(F[n - r]) % MOD;
result = result * modInv(F[r]) % MOD;
return result;
}
static long modInv(long n)
{
return modPow(n, MOD - 2);
}
static void factorial(int n)
{
F = new long[n + 1];
F[0] = F[1] = 1;
for (int i = 2; i <= n; i++)
{
F[i] = (F[i - 1] * i) % MOD;
}
}
static long modPow(long x, long n)
{
long res = 1L;
while (n > 0)
{
if ((n & 1) == 1)
{
res = res * x % MOD;
}
x = x * x % MOD;
n >>= 1;
}
return res;
}
//↑nCrをmod計算するために必要
static int gcd(int n, int r) { return r == 0 ? n : gcd(r, n%r); }
static long gcd(long n, long r) { return r == 0 ? n : gcd(r, n%r); }
static <T> void swap(T[] x, int i, int j) { T t = x[i]; x[i] = x[j]; x[j] = t; }
static void swap(int[] x, int i, int j) { int t = x[i]; x[i] = x[j]; x[j] = t; }
public static void reverse(int[] x)
{
int l = 0;
int r = x.length - 1;
while (l < r)
{
int temp = x[l];
x[l] = x[r];
x[r] = temp;
l++;
r--;
}
}
public static void reverse(int[] x,int s, int e)
{
int l = s;
int r = e;
while (l < r)
{
int temp = x[l];
x[l] = x[r];
x[r] = temp;
l++;
r--;
}
}
static int length(int a) {int cou = 0; while(a != 0){ a /= 10; cou++; } return cou;}
static int length(long a) {int cou = 0; while(a != 0){ a /= 10; cou++; } return cou;}
static int countC2(char[][] a, char c){
int co = 0;
for (int i = 0; i < a.length; i++)
for (int j = 0; j < a[0].length; j++)
if(a[i][j] == c)
co++;
return co;
}
static void fill(int[][] a, int v){
for (int i = 0; i < a.length; i++)
for (int j = 0; j < a[0].length; j++)
a[i][j] = v;
}
static int max(int a, int b, int c)
{
return Math.max(a, Math.max(b, c));
}
static int max(int[] ar)
{
int res = Integer.MIN_VALUE;
for (int i : ar)
res = Math.max(res, i);
return res;
}
static int max(int[][] ar)
{
int res = Integer.MIN_VALUE;
for (int i[] : ar)
res = max(i);
return res;
}
static int min(int a, int b, int c)
{
return Math.min(a, Math.min(b, c));
}
static int min(int[] ar)
{
int res = Integer.MAX_VALUE;
for (int i : ar)
res = Math.min(res, i);
return res;
}
static int min(int[][] ar)
{
int res = Integer.MAX_VALUE;
for (int i[] : ar)
res = min(i);
return res;
}
static int abs(int a){
return Math.abs(a);
}
static class FastScanner {
private BufferedReader reader = null;
private StringTokenizer tokenizer = null;
public FastScanner(InputStream in) {
reader = new BufferedReader(new InputStreamReader(in));
tokenizer = null;
}
public String next() {
if (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
tokenizer = new StringTokenizer(reader.readLine());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken();
}
/*public String nextChar(){
return (char)next()[0];
}*/
public String nextLine() {
if (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
return reader.readLine();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken("\n");
}
public long nextLong() {
return Long.parseLong(next());
}
public int nextInt() {
return Integer.parseInt(next());
}
public double nextDouble() {
return Double.parseDouble(next());
}
public int[] nextIntArray(int n) {
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = nextInt();
}
return a;
}
public int [][] nextIntArray2(int h, int w){
int[][] a = new int[h][w];
for(int hi = 0 ; hi < h ; hi++){
for(int wi = 0 ; wi < w ; wi++){
a[hi][wi] = nextInt();
}
}
return a;
}
public int[] nextIntArray21(int n, int scalar)
{
int[] a = new int[n];
for (int i = 0; i < n; i++)
a[i] = nextInt() * scalar + nextInt();
return a;
}
public Integer[] nextIntegerArray(int n) {
Integer[] a = new Integer[n];
for (int i = 0; i < n; i++) {
a[i] = nextInt();
}
return a;
}
public char[] nextCharArray(int n){
char[] a = next().toCharArray();
return a;
}
public char[][] nextCharArray2(int h , int w){
char[][] a = new char[h][w];
for (int i = 0; i < h; i++) {
a[i] = next().toCharArray();
}
return a;
}
//スペースが入っている場合
public char[][] nextCharArray2s(int h , int w){
char[][] a = new char[h][w];
for (int i = 0; i < h; i++) {
a[i] = nextLine().replace(" ","").toCharArray();
}
return a;
}
public char[][] nextWrapCharArray2(int h , int w, char c){
char[][] a = new char[h + 2][w + 2];
//char c = '*';
int i;
for (i = 0; i < w + 2; i++)
a[0][i] = c;
for (i = 1; i < h + 1; i++) {
a[i] = (c + next() + c).toCharArray();
}
for (i = 0; i < w + 2; i++)
a[h + 1][i] = c;
return a;
}
//スペースが入ってる時用
public char[][] nextWrapCharArray2s(int h , int w ,char c){
char[][] a = new char[h + 2][w + 2];
//char c = '*';
int i;
for (i = 0; i < w + 2; i++)
a[0][i] = c;
for (i = 1; i < h + 1; i++) {
a[i] = (c + nextLine().replace(" ","") + c).toCharArray();
}
for (i = 0; i < w + 2; i++)
a[h + 1][i] = c;
return a;
}
public long[] nextLongArray(int n) {
long[] a = new long[n];
for (int i = 0; i < n; i++) {
a[i] = nextLong();
}
return a;
}
public long [][] nextLongArray2(int h, int w){
long[][] a = new long[h][w];
for(int hi = 0 ; hi < h ; hi++){
for(int wi = 0 ; wi < h ; wi++){
a[h][w] = nextLong();
}
}
return a;
}
}
}
| 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("%lld\n",x/11*2+(x%11+5)/6);}
| ^~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
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("%lld\n",x/11*2+(x%11+5)/6);}
| ^~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
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// make_pair
int main(){
// kokoni kaku
ll x;
cin>>x;
ll quot =ldiv(x,11).quot*2;
ll rem =ldiv(x,11).rem;
if(rem!=0)quot+=(rem>6?2:1);
cout<<quot<<endl;
return 0;
}
| 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: expected ';' before 'quot'
20 | ll quot =ldiv(x,11).quot*2;
| ^~~~~
| ;
a.cc:21:7: error: expected ';' before 'rem'
21 | ll rem =ldiv(x,11).rem;
| ^~~~
| ;
a.cc:22:8: error: 'rem' was not declared in this scope
22 | if(rem!=0)quot+=(rem>6?2:1);
| ^~~
a.cc:22:15: error: 'quot' was not declared in this scope
22 | if(rem!=0)quot+=(rem>6?2:1);
| ^~~~
a.cc:23:5: error: 'cout' was not declared in this scope
23 | cout<<quot<<endl;
| ^~~~
a.cc:23:11: error: 'quot' was not declared in this scope
23 | cout<<quot<<endl;
| ^~~~
a.cc:23:17: error: 'endl' was not declared in this scope
23 | cout<<quot<<endl;
| ^~~~
|
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;
if (x > 6)
ans += 2;;
else if (x % 11 > 0)
ans ++;
w.println(ans);
w.close();
}
static class InputReader {
private final InputStream stream;
private final byte[] buf = new byte[8192];
private int curChar, snumChars;
private SpaceCharFilter filter;
public InputReader(InputStream stream) {
this.stream = stream;
}
public int snext() {
if (snumChars == -1)
throw new InputMismatchException();
if (curChar >= snumChars) {
curChar = 0;
try {
snumChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (snumChars <= 0)
return -1;
}
return buf[curChar++];
}
public int nextInt() {
int c = snext();
while (isSpaceChar(c)) {
c = snext();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = snext();
}
int res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = snext();
} while (!isSpaceChar(c));
return res * sgn;
}
public long nextLong() {
int c = snext();
while (isSpaceChar(c)) {
c = snext();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = snext();
}
long res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = snext();
} while (!isSpaceChar(c));
return res * sgn;
}
public int[] nextIntArray(int n) {
int a[] = new int[n];
for (int i = 0; i < n; i++) {
a[i] = nextInt();
}
return a;
}
public String readString() {
int c = snext();
while (isSpaceChar(c)) {
c = snext();
}
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = snext();
} while (!isSpaceChar(c));
return res.toString();
}
public String nextLine() {
int c = snext();
while (isSpaceChar(c))
c = snext();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = snext();
} while (!isEndOfLine(c));
return res.toString();
}
public boolean isSpaceChar(int c) {
if (filter != null)
return filter.isSpaceChar(c);
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
private boolean isEndOfLine(int c) {
return c == '\n' || c == '\r' || c == -1;
}
public interface SpaceCharFilter {
public boolean isSpaceChar(int ch);
}
}
}
| 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;
if (x > 6)
ans += 2;;
else if (x % 11 > 0)
ans ++;
w.println(ans);
w.close();
}
static class InputReader {
private final InputStream stream;
private final byte[] buf = new byte[8192];
private int curChar, snumChars;
private SpaceCharFilter filter;
public InputReader(InputStream stream) {
this.stream = stream;
}
public int snext() {
if (snumChars == -1)
throw new InputMismatchException();
if (curChar >= snumChars) {
curChar = 0;
try {
snumChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (snumChars <= 0)
return -1;
}
return buf[curChar++];
}
public int nextInt() {
int c = snext();
while (isSpaceChar(c)) {
c = snext();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = snext();
}
int res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = snext();
} while (!isSpaceChar(c));
return res * sgn;
}
public long nextLong() {
int c = snext();
while (isSpaceChar(c)) {
c = snext();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = snext();
}
long res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = snext();
} while (!isSpaceChar(c));
return res * sgn;
}
public int[] nextIntArray(int n) {
int a[] = new int[n];
for (int i = 0; i < n; i++) {
a[i] = nextInt();
}
return a;
}
public String readString() {
int c = snext();
while (isSpaceChar(c)) {
c = snext();
}
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = snext();
} while (!isSpaceChar(c));
return res.toString();
}
public String nextLine() {
int c = snext();
while (isSpaceChar(c))
c = snext();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = snext();
} while (!isEndOfLine(c));
return res.toString();
}
public boolean isSpaceChar(int c) {
if (filter != null)
return filter.isSpaceChar(c);
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
private boolean isEndOfLine(int c) {
return c == '\n' || c == '\r' || c == -1;
}
public interface SpaceCharFilter {
public boolean isSpaceChar(int ch);
}
}
}
| 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 * x - 1);
return bestresult;
}
int main(void) {
u64 x;
scanf("%llu", &x);
printf("%llu", solve(x));
return 0;
}
| 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 <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define DEBUG
#ifdef DEBUG
#define debug_printf printf
#else
#define debug_printf 1 ? 0 : printf
#endif
using namespace std;
typedef long long int ll;
typedef vector<ll> Vl;
typedef vector<int> Vi;
typedef pair<int, int> Pi;
#define INF (1e9 + 7)
ll X;
void solve() {
ll ans = X / 11;
X = X - 11 * ans;
ans *= 2;
ans += (X + 5) / 6;
printf("%lld\n", ans);
}
int main() {
scanf("%lld", &X);
solve();
return 0;
}
| 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_ostream<char>' and 'int')
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ~~~~~~~~~~~ ^~ ~
| | |
| | int
| std::basic_ostream<char>
a.cc:16:13: note: candidate: 'operator==(int, int)' (built-in)
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ~~~~~~~~~~~~^~~~
a.cc:16:13: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::fpos<_StateT>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::allocator<_CharT>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/string:48:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
629 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
637 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/bits/basic_string.h:3755:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3819 | operator==(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2558 | operator==(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
from /usr/include/c++/14/bits/basic_ios.h:37,
from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)'
234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
| ^~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'co |
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_ostream<char>' and 'int')
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ~~~~~~~~~~~ ^~ ~
| | |
| | int
| std::basic_ostream<char>
a.cc:16:13: note: candidate: 'operator==(int, int)' (built-in)
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ~~~~~~~~~~~~^~~~
a.cc:16:13: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::fpos<_StateT>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::allocator<_CharT>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/string:48:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
629 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
637 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/bits/basic_string.h:3755:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3819 | operator==(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2558 | operator==(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
from /usr/include/c++/14/bits/basic_ios.h:37,
from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)'
234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
| ^~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'co |
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 += 1;
printf("%I64d\n", ans);
return 0;
} | 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:21: error: 'x' was not declared in this scope
13 | scanf("%I64d", &x);
| ^
a.cc:14:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
14 | ans += x / 11 * 2;
| ^~~
| abs
|
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: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
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'
14 | return 0;
| ^~~~~~
main.c:15:1: error: expected identifier or '(' before '}' token
15 | }
| ^
|
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,-1,1,1,-1,1,-1};
long long x,y,z[100010];
__int64 ert;
stack<int> s;
struct P
{
int x;
int y;
bool operator<(const P &a)const
{
return y>a.y;
}
};
//map<int, int> p;
queue<P> q;
priority_queue<int> q1;
string r;
vector<int> v[200010];
bool sdf(P a,P b){return a.y<b.y;}
int main()
{
scanf("%lld",&x);
y=x/11*2;
if(x%11>6) y++;
if(x%11) y++;
printf("%lld",y);
return 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();
long a = (x / 11) * 2;
x %= 11;
while (true) {
++a;
x -= 6;
if (x <= 0) break;
++a;
x -= 5;
if (x <= 0) break;
}
System.out.println(a);
}
}
}
| 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;
if(temp!=0){
System.out.println((temp>6) ? sum*2+2:sum*2+1);
}else{
System.out.println(sum*2);
}
}
}
| 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){
cin>>n>>K;
C[0][0] = C[1][0] = C[1][1] = 1;
for(int i = 2; i <= 2000; i++){
C[i][0] = C[i][i] = 1;
for(int j = 1; j < i; j++)
C[i][j] = (C[i-1][j-1] + C[i-1][j]) % MM;
}
pw[0] = 1;
for(int i = 1; i <= 2000; i++){
pw[i] = (2 * pw[i-1]) % MM;
}
ll ans = 0;//pw[n-K-1];
f[0][0] = 1;
for(int i = 0; i <= n; i++)
sum[0][i] = 1;
for(int i = 1; i < K; i++){
for(int j = 0; j <= n - i; j++){
f[i][j] = sum[i-1][j+1];
}
sum[i][0] = f[i][0];
for(int j = 1; j <= n - i; j++)
sum[i][j] = (sum[i][j-1] + f[i][j]) % MM;
}
for(int i = 0; i <= n - K; i++)
ans = (ans + f[K-1][i]) % MM;
cout<<((K!=n)?(ans * pw[n-K-1] % MM):ans)<<endl;
}
void printans(){
}
int main(){
prework();
int T = 1;
// cin>>T;
for(int i = 1; i <= T; i++){
read();
solve(i);
printans();
}
return 0;
}
| 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
typedef pair<int, int> PII;
^
Main.java:8: error: class, interface, enum, or record expected
const int MM = 1e9 + 7;
^
Main.java:9: error: class, interface, enum, or record expected
const double eps = 1e-8;
^
Main.java:10: error: class, interface, enum, or record expected
const int MAXN = 2e6 + 10;
^
Main.java:12: error: class, interface, enum, or record expected
int n, m;
^
Main.java:14: error: unnamed classes are a preview feature and are disabled by default.
void prework(){
^
(use --enable-preview to enable unnamed classes)
Main.java:23: error: class, interface, enum, or record expected
ll C[2222][2222];
^
Main.java:24: error: class, interface, enum, or record expected
ll pw[2222];
^
Main.java:25: error: class, interface, enum, or record expected
ll f[2222][2222];
^
Main.java:26: error: class, interface, enum, or record expected
ll sum[2222][2222];
^
Main.java:29: error: not a statement
cin>>n>>K;
^
Main.java:54: error: not a statement
cout<<((K!=n)?(ans * pw[n-K-1] % MM):ans)<<endl;
^
15 errors
|
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_ARGS__,REP1,REP2,REP3))(__VA_ARGS__)
#define rrep(i, s) rep(i, s, >= 0, --)
#define all(c) begin(c), end(c)
#define X first
#define Y second
template<typename T>bool maxup(T& a, T&& b) { if (a < b) { a = b; return true; }; }
template<typename T>bool maxup(T& a, T& b) { if (a < b) { a = b; return true; }; }
template<typename T>bool minup(T& a, T&& b) { if (a > b) { a = b; return true; }; }
template<typename T>bool minup(T& a, T& b) { if (a > b) { a = b; return true; }; }
using VV = vector<vector<int>>;
using V = vector<int>;
using P = pair<int, int>;
using IP = pair<int, P>;
template<typename T>
inline void input(vector<T>& v) { for (auto& x : v) cin >> x; }
const int MAX_N = 3e5;
int ls[MAX_N], rs[MAX_N], anses[MAX_N];
signed main() {
int n, m;
scanf("%d%d", &n, &m);
for (int i = 0; i < n; i++) {
scanf("%d%d", &ls[i], &rs[i]);
}
for (int i = 0; i < n; i++) {
for (int d = 1; d <= m; d++) {
anses[d - 1] += (ls[i] - 1) / d * d + d <= rs[i];
}
}
for (int i = 0; i < m; i++) {
printf("%d\n", anses[i]);
}
//system("pause");
} | 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) { for (auto& x : v) cin >> x; }
| ^~~~~
a.cc:30:19: error: 'vector' was not declared in this scope
30 | inline void input(vector<T>& v) { for (auto& x : v) cin >> x; }
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include <iostream>
+++ |+#include <vector>
2 | using namespace std;
a.cc:30:27: error: expected primary-expression before '>' token
30 | inline void input(vector<T>& v) { for (auto& x : v) cin >> x; }
| ^
a.cc:30:30: error: 'v' was not declared in this scope
30 | inline void input(vector<T>& v) { for (auto& x : v) cin >> x; }
| ^
|
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);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x) cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
//constants
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int INF = 1<<28;
int main(int argc, char **argv) {
double x;
cin >> x;
long long ans = 0;
ans += x/11;
ans *= 2;
if (x%11 <= 6)
ans++;
else
ans += 2;
cout << ans << endl;
return 0;
}
| 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",i);
return;
} | 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 -= 5;
ans++;
}
cout << ans << endl;
return 0;
}
| 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) break;
remain -= 5;
ans++;
}
cout << ans << endl;
return 0;
}
| 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;
}
return 0;
} | 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;
| ^~~~~
| ;
a.cc:14:9: error: 'divv' was not declared in this scope; did you mean 'div'?
14 | divv += m[x%11];
| ^~~~
| div
|
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) break;
remain -= 5;
ans++;
}
cout << ans << endl;
return 0;
}
| 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>
using ml = boost::multiprecision::cpp_int;
using md = boost::multiprecision::cpp_dec_float_100;
#endif
/***** type *****/
using ll = long long;
using ld = long double;
using pll = pair<long long, long long>;
template <class T> using vt = vector<T>;
template <class T> using vvt = vector<vector<T>>;
template <class T> using vvvt = vector<vector<vector<T>>>;
/***** define *****/
#define all(c) (c).begin(), (c).end() // begin to end
#define coutld cout << fixed << setprecision(10) // cout double
#define output(x) do { cout << x << endl; exit(0); } while(0)
#define rep(i, b, e) for (ll i = b; i < e; i++) // repeat
#define repr(i, b, e) for (ll i = b; e < i; i--) // repeat reverse
#define fori(i, ...) if (ll i = -1) for(__VA_ARGS__) if (i++, 1)
#define each(i, e, c) fori (i, auto&& e: c) // for each
/***** const value *****/
#define llong_max 9223372036854775807 // 9 * 10^18
#define ldbl_max 1.79769e+308 // 1.7 * 10^308
#define pi 3.1415926535897932 // 3.14 ...
/***** lambda *****/
auto Ceil = [] // if (a % b != 0) return a / b + 1;
(auto x) { return (ll)ceil(x); };
auto Count = [] // long long count value
(auto b, auto e, auto x) { return (ll)count(b, e, x); };
auto CtoL = [] // char to number
(auto c) { return (ll)c - (ll)'0'; };
auto LtoC = [] // number to char
(auto n) { return (char)('0' + n); };
auto Pow = [] // long long pow
(auto a, auto b) { return (ll)pow(a, b); };
auto Pow2 = [] // long long pow2
(auto n) { return (1LL << n); };
auto Pow10 = [] // long long pow10
(auto n) { return (ll)pow(10, n); };
auto Size = [] // long long collection size
(auto& c) { return (ll)(c).size(); };
auto Sum = [] // long long accumulate
(auto b, auto e) { return accumulate(b, e, 0LL); };
/***** operator *****/
template <class T, class S> pair<T, S> operator + (pair<T, S> l, pair<T, S> r)
{ // pair<T, S> + pair<T, S>
return { l.first + r.first, l.second + r.second };
}
template <class T, class S> pair<T, S> operator - (pair<T, S> l, pair<T, S> r)
{ // pair<T, S> - pair<T, S>
return { l.first - r.first, l.second - r.second };
}
/***** template *****/
template <class A, class B, class C> struct triple
{ // tuple<A, B, C>
A a = A(); B b = B(); C c = C();
};
template <class T> void MakeVVT
(ll ys, ll xs, vvt<T>& v, T fill = T())
{ // vector<vector<T>> resize + fill
v.resize(ys); rep(y, 0, ys) v[y].resize(xs, fill);
}
template <class T> void MakeVVVT
(ll zs, ll ys, ll xs, vvvt<T>& v, T fill = T())
{ // vector<vector<vector<T>>> resize + fill
v.resize(zs); rep(z, 0, zs) MakeVVT(ys, xs, v[z], fill);
}
template <class T> void InputVVT
(ll ys, ll xs, vvt<T>& v, T fix = T())
{ // input vector<vector<T>> (T != struct) + fix
MakeVVT(ys, xs, v, fix);
rep(y, 0, ys) rep(x, 0, xs) { cin >> v[y][x]; v[y][x] += fix; }
}
template <class T> void InputVVVT
(ll zs, ll ys, ll xs, vvvt<T>& v, T fix = T())
{ // input vector<vector<vector<T>>> (T != struct) + fix
v.resize(zs); rep(z, 0, zs) InputVVT(ys, xs, v[z], fix);
}
/**************************************/
/********** BEGIN OF NYA LIB **********/
/**************************************/
namespace NyaGadget {}
/**************************************/
/*********** END OF NYA LIB ***********/
/**************************************/
using namespace NyaGadget;
//using mll = NT_ModLL< 1000000007 >;
//using mll = NT_ModLL< 998244353 >;
int main()
{
ll N; cin >> N;
vt<ll> A(N); each(i, e, A) cin >> e;
map<ll, ll> countValue; each(i, e, A) countValue[e]++;
ll test = 0;
each(i, e, countValue) test += e.second - 1;
if (test % 2 == 0) cout << Size(countValue) << endl;
else cout << Size(countValue) - 1 << endl;
return 0;
}
| 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{{R31ONa4I066w00000I066w00000I066w000008~^|S000008~^|S000000RR91000000RR911poj5000000000000000000000000000000Vio`Z00000Vio`Z00000001BW000000RR911^@s6FdYB@00000FdZNO00000FdZNO00000=mG!$00000NCp4^00000001BW000000ssI21^@s6NF4wG00000NF5*m00000NF5*m000005CQ-I000005CQ-I000002mk;8000001ONa41ONa4R004100000R004100000R004100000L;wH)00000L;wH)000001ONa400000P~~)F1ONa4WD@`Y00000WD@`Y00000WD@`Y00000WB>pF00000WB>pF000001ONa400000QRQ@G1^@s6000000000000000000000000000000000000000000000000005C8xG00000Qss1H1ONa4FdYB@00000FdZNO00000FdZNO00000&;kGe00000&;kGe000000RR9100000FKlUIHZ(76WG!rIZgqGqcsMpKHZ(4CZ!R(b1ONa45C8xG0RR91M^04$000000{{R30ssI2000001ONa46aWAK0{{R3M^04$(Idwe?3DA?0bf;Y2+~1B2cVIj0{{R36aWAK0RR911^@s6000mIApjHr6aWAK00000761SMa+U`IC2b5t6_^Y|0000000000000000000000000000009RUCU5&!@I00000000000000000000zySaNA^-pY00000000000000000000;s5{u5&!@I00000000000000000000i2wiq5&!@I00000000000000000000vjG4A5&!@I00000000000000000000f&c&j5&!@I00000000000000000000SOEY45&!@I00000000000000000000q5%K^5&!@I00000000000000000000lmGw#5&!@I00000000000000000000HUR(t5&!@I00000000000000000000&jA1c5&!@I00000000000000000000Z2$lO5&!@I00000000000000000000aRC4T5&!@I000000000000000000009{>OVAOHXW00000000000000000000i2(or5&!@I00000000000000000000*8u<k5&!@I000000000000000000005C8xGAOHXW00000000000000000000I{*LxAOHXW00000000000000000000RR9105&!@I00000000000000000000UI73A5dawgKp`Li000007y$qP00000P5}S_5dawgU?Ly@000005CH%H00000X8`~J5dawgARr(B000005CH%H000000BmVub97{5D=RK@Z!R_fUtec!Z*E_6bYXIIUta)UNmNZ=WMy(?XK8bEWpY$aLu_wuWmI8eY-IpnNmNZ=a%E>}b97~LR82!{Z*FB&VPb4$0AE^8Q*=0KZ*yN_VRL0PNp5L$L@`Bn0AF8ccz9oMWpZ<GZeeU`ba`KPFaTd#WNc7&0AE^8Q)zN@MN(-1Us_XiF*aXcZ*z2VWnpb!X>N06a&$>!Q*<#gV`yP=UvzR|X>@Z*V?{+$Q*<#iVqtS>V_$D`baG{3ZAnyLR4`vfQ#M~vOH(snYye+cQ*<<CZe(mpV^ef7F=J?9a$j_EVQF-8Nn=GtQd4v>Gh$(LX=7h+b98cLVQooNUsNz(MN>9k0AE^DbTKzyUvy}4Z+Bl}VPs!nY;131b^u>mPE&L^X>W61VqtS-G)Zo0bVD&kb^u>mQ*<<AWpZ)=Us`T=Z2(_dQ*<+9X>I^tT2pj1V{dhI0AE^8Q*Uf@MQH$RX<}z%V_$PFb8jv&0AE#ZcWG{9Us7drb!}w;Y-wU+E^}`#HUM8=b97;2YhPn%YhPwzX>0&rUt@S-Utx4*cxiM1UteQ*VP9rxZeeU`dSw7@Wo>P5c4YuxUu<b&V_$Q0VRCd|ZDDC{07pYZUo$Q+07pzoLPK9NE;Il~Oi4mRUotK-E;Rr{SXe<qNnbH8GXO_SNkT(dSYI<PG%h&+M@&gVLs(c}GcGg$000620{{X50ssR50ssO41ONp90ssR51^@y8000L70{{R3000620ssO40ssI2000000RRC2djS9d5C8xGAOHXWP$qc`000L7=>Y%$000000RRF3m;nF)5C8xGFaQ7m6lrM<000C4@c{q;5C8xGbsA|200093`vCv|000000RRI40RR915C8xG00000)30j<000I62Lb>95C8xGiGL{q000F55&{4K5C8xGbSaVu00062AOZjY00000FdZNO000002mk;800000@D2a~00000I2|AW000002mk;800000zzqNZ00000Kph|e000002mk;800000unqtK000002p}K;000002mk;8000002p}K;00000&>tWG000001^@s60ssI20000000000*dHJO000001^@s64gdfE0000000000;2$6W000001^@s65C8xG0000000000=pP^e000001^@s65dZ)H0000000000@E;%m000001^@s65&!@I0000000000_#Yqu000001^@s66951J00000000005Fj7`000000RR913;+NC0000000000ARr(B000001poj5761SM0000000000Kp`Li000001poj56aWAK0000000000U?Ly@000001poj56#xJL0000000000a33H5000002LJ#70RR910000000000cpo4D000002LJ#70{{R30000000000fFB?L000002LJ#71ONa40000000000h#w#T000002LJ#71poj50000000000kRKob000002LJ#71^@s60000000000m>(bj000002LJ#72LJ#70000000000pdTOr000002LJ#72mk;80000000000s2?Bz000002LJ#72><{90000000000upb}*000002LJ#73IG5A0000000000xE~+@000002LJ#73jhEB0000000000z#kw0000002LJ#74FCWD0000000000$R8j8000002LJ#74*&oF0000000000NQ3MMNQ(uH6(9geg}`(I|IkQ-#0bLx0000000000|266qAOQa*>=YmX4<A4P|0U`aAOL6p0002#;Q#;s|0UuSAOL6q0002#(EtDc|0UWKAOL6r0002#!2kdM|0U8CAOL6s0002#u>b%6|0T*4AOL6t0002#p#T5>|0Ti{AOL6u0002#kpKVx|0TK<AOL6v0002#fdBvh|0S{%AOL6w0002#aR2}R|0SvvAOL6x0002#VE_OB|0SXnAOL6y0002#Q2+n`|0S9fAOL6z0002#K>z>$|0R+XAOL6!0002#F#rGm|0RkPAOL2N0000000000K~_OkNR2(^6(9gXR8><*gX|DUjdUagWJrqyB`5#@07!{MBnUCU=p+CC|43tOBm_u>?GJ?H0RR9<xc~qE|NsC0KS(*n4~Gf@002ylEUf?l002yh@8}}`|Nlsd!!f`QA4C8E#{`1_0000;gTMhuImLDGPK_ihNQvD{jWuc&AOK7`;}3+L0001xNQv%DiTCKW{{R0-gT(|%IqY@pOo`~aKL7v#Oo`@5!T175iQh;My}(F=@IOeHNGZZd0n+F-0{{R?gZ)4cjw%5F07!%E2uO`<KuC$-Y5+)y?&#J8002xm<yl^II}aa#00000i**2tRs2YeMf^GPe+}sj0RR9GA4C8ENQuaaPy~xm{78*R{5jTq??{8i1c@+7IqY@JzmQZ60O(5o|Nlsd#Yl~nkW>r+NQvkVA4C8E#{d8T002mXzywG+!gcYBd?W;g|9&EkPya}X*hr0Ziv(s5A4C8ENMi^{gTMrXM2!FeNICFz??{R0G4^II4<Cd800000gE#?$-v3C0zywG+!gcW}_lfwy=pO;cgXaM$$1%Wz{{cviJr@%o01uSFDaPmx{{R0-iO1-5{r~?+iSOv0{r~?+h1+xpNQvL*kp2JvF~CTRTqFo&NHZKIC;$Keb!$k2#1LCuL0myyL0-d1gX{=QiRMU&-)aEpumb=9SX${7|Ns9;iRkG9|NsBLkW>r+G27@>{r~?+iN)y#|Ns9;iSJ2?#ON~p|NlsZ+jIy>iQniY{r~?=iRb8z{r~?-iNx#c=+pfF|L89L|NjpkKmcYg4<Cd800000NR2(J6(9gegX{?CF#Z4kNQ*ro5+DFbjTI^qAOJ{>HH;M?07!$x2<gK7|Nmx?G3`l-(OyW2;z)z!@K97tjRi^t002mh4bubw07#8JJpKRw{}sj&AOQ3aA4C8ENR2)55g-6nNR0*Q5g-6aIrvD4<#ZWHiv^kyAOJ{(z;q2=|KMgW4<Cd800000UBeF_KmcYg4<Cd800000NR2(Q5g-6ajWwzfAOKZJDgH=_<w(K)14xPRNWthoNCC!3(f)K8NQ(tw5g-6ag}`(SUH{-_4<Cd800000UBeF_KmcYg4<Cd800000fIYbsAOHY$FGzzu4-p^$098nd<#Y^4i#<9KAOPrX{Qv*xNdN!;#s!fSAOHbf!w(;T00000^TTEjA4C8ERY-~DUFl~3|NmwWA4C8ENQ3McNR2&J6CeP(0RR91NR4zP2gXDs2MT0Jiv%So0000;i9{p_F~I1-`~Uw)i$o*{WJogvB`5#@0CfdOgTxra=$HHd{|_I400000K~_OkNr}}+iSj{IRY)oNQ%HmQKo5?20RR9^h3!d+{7H%S4}|#u002mhZv;q*^Gqq@L5qAO1WAMK0Z7670*hAsMT-O^NQu};!RS9o0mDeq`$>%qoQnZD$9-uz&<~6@0RR9w*L-O~i994li9{p>i&p$diR(y-@edyWL^;PviQa!NIoC*yLHvDSNR2`G4<A4PNQuEngXjc{Py{*GeDX*+*>+Wl6GVvti&6YRi##Mmi$erRgTn;tzYiaP00000IoEujInWP{$p8QVL5UP3M2SZHM2W&di##Mni$o*@>y2g)A4C8ENQuEnIoWr!4<Cd800000Oo{49iQnk;{{R0-iP}sl;z)z~Kz@Bqh3!a*-VcQi|Ns9;iPK2I`vORfYyL>l{p$%2A4C8ENQ3PGNQ3MML5mEmNQv%h07!}2Oo`{{3;_TDNQLcLUUl6`gYE>7L5l<=Oo{VBiw;PG><COL<1zL~iP}tw=ShR^1VM>L1Zn_C!TJK|)BpegNQ3(XSXzI~TU|k1L0v&!!$FAzBt(e;MT<lv1VM{DB#T!3>B9d1|7I=^AA|q^0001xNICuwgns}406|tvjduh=RY{5UK~zbJ{7E_XRZ~of^K~feR}UWmNjcnf5lD&JOo{hQiRMfx;^@Np|NlsX!vsNzEF?)e-E=XFD?vLfBz)D2Q~XGcL;N|_d<E+;NQuaaPy~xm{78*R{5jQp?};c#gTn+#Io);7TU|k1L0v&!!w(+-^TTEjA4C8ENQu~qDC^v24<Cd800000NR2}OK~+IiNr}}}Q%Q-$L4)N1Nx|$tNdd%3(fmv~<`0ee0000<iSlL-A4C8ENsU4QOpOEpOpOf3O^sOpL5l%OjVzywT>v@5eh5j4>514)iP%j!;6jN6mraSne9ldU?R0TTjX?iMiNZ+1>OV*U!bs8jNjdO-Ktziamqa<ye;MmF4<Cd800000M2i%MNr})%iNZuV(S9CAi4=!SjY9uSjSQDeiNHv~=s!#Wz(~>fNIBMg(?N*|TU|k1L0!XU4<Cd800000Nr~_eA4C8ENR2}NNQuHo!RkLq0m4Yp`b;^(bP`UD42S7(|NsAH4<Cd800000ON~ST0Zfeyhe3-GLWvZINr}MePyhe_4<Cd800000O@-}rt4xgyx9gG*A4C8EL03UmNr~4%RY6otjU_$`AOKZJjV(qBAOKTAiTz25_Dm_|NQ3MMNWuLB=s)-W|44=HbRaR?4<Cd800000Oo{qTiS|T^??L|*+(?7N0Z2LBb?Qii#0XnmL0myyL0&;$!;oe!4<Cd800000^TPlDNQ3MMNQ1-(!vFvP0RRF30UHB5U;qFB3jhEB4EO*4tN;K2-1q<g)Bpeg?Dzlw2m$~AT>Ah2YytoPjQaood;kCdocsU(>;M1&?EC-!kO2Syto{H02mt^9O#c7>SOEY4eE<LdgaQBn?EnA&%mM%a6aWAK000000eVsZ0eBDr8w>{skO2n}6aWAK8~^|S2>Sp3D*ylh00000000006aWAK000000eVsZ0eBDr8w>{skO2SyBme*a8~^|SSoZ(_&;S4c01gmF4j4)g3wH>B06!W#Dl;S^000006aWAKL;wH)0Qdj@2mk;800000000007ytkOTmS$7sQUl^NdN!<07MQTe+mu=K??u?OaK4?cmMzZoc#a)mjD0&080)Kjsivw7>xr(4j_yKM-C{41wjrlg9ZX$4k$qmAVLlpLJkl@4hTfU#>~ymNDeTA28IQU1dRiZ0ssI2Gynhq$N&HU?EL@#D**ri07ecFjRHar7>ol%4j_gEK@KQ`1p>4R4j@4e7(xyZLJkN@3jhEBQ~&?~00961RQmt_wE+MC074EBjsijs7>xr+4j_yKK@KQ}1w;-og9ZaH0S-7x4nR*1I6)3DRSq~+4nR&0I6)3DLkbQkK@K274j4iX5JC<JK??u?8~^|S000000eVnOQUC#X5C@yF3LpR*8w>{skO2SyU;qFBBme*a-1YzeVgdjF1j_&b074EBjsijs7>xr-4j_yKK@KQ}1wjrlg9bznKmx`NNJ$P*Ob$pv4nPA30SXQ<K@KQE4j@7f7(xyZLJkN)3q%e`NDfd&4oE=`KmY&$6aWAK+yMXp==cBsE&u=k080)KUJeKVL;wH)^Z@_>@cjS(WdHyG074EBj{-st7>)x)4j_#LLJla51xOAsh6YFuID-dG4nT4aI6)3DK@KQF4j@7f7(xyZLJkN35C8xGJOTg!82$hM0ssI20000000000|Nj9NC^i59mI0sv(*yv%0}ZnT0Hy>t00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000@D2a~00000zzqNZ00000unqtK000000RR91000000RR91000000RR9100000djS9d000000RR9100000m;nF)000003;+NC00000PznG5000004FCWD00000R1*LI0000082|tP00000FdZNO000008vp<R000005C8xG000008UO$Q00000Kph|e000008~^|S000002mk;800000_5S~F00000m;wL*000001poj500000@B{z=000001^@s600000$N~TW000003IG5A00000ECK)k000003jhEB000007ytkO000006#xJL0000000000000000{{R300000SRWt&000000ssI200000AOQdX000006aWAK000002LJ#7000007XSbN00000FbMzv000002LJ#700000;0FKz000002mk;800000Pyqk{000002><{9000007ytkO000009smFU000002mk;800000`~UxM000000RR9900000{{R1P00000PzL}200000|NsAQ000000{{R300000@c;jB0000090vdZ00000`TzfK000001ONa4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000NF5*m0000000000000000000000000h6(@x00000mI?p>00000rV0Q600000wh90M00000#tHxc00000)(QXs00000<_Z7+00000_6h(1000001`7ZH0000077G9X00000CJO)n00000HVXg%0000000000000000000000000000000000000000000000000000000000000000000000000002p}K;000000000000000M?*t8AShL0b#8QZAU7^GE-)=Kbz*gHbagR)F*q(TG$|lAE;TMN0000000000000000000000000000000000000000000000{{U4I066w000000000000000000000{{X5R0041000000000000000000000{{a6bOHbX000000000000000000000{{d7m;wL*000000000000000000000{{g8$N~TW000000000000000000000{{j9@B{z=000000000000000000000{{mA90vdZ000000000000000000000{{pBPzL}2000000000000000000000{{sC;0FKz000000000000000000000{{vDFbMzv000000000000000000000{{yEPznG5000000000000000000000{{#Fa0&nb000000000000000000000{{&GKnnl>000000000000000000000{{*HPzwM6000000000000000000000{{;IR1*LI000000000000000000000{{>JU=siU000000000000000000000{{^KWD@`Y000000000000000000000{{{L$P)kn000000000000000000000{{~MNEQG9000000000000000000000{|2NFdZNO000000000000000000000{|5OKph|e000000000000000000000{|8PNF5*m000000000000000000000{|BQSRWt&000000000000000000000{|ER03aX$000000000000000000000{|HSARr(B000000000000000000000{|KT000000000000000000000RR911OV~>000000000000000000005&!@I0ssyGP!9kA00000wE+MC00000kN^Mx0ssyGzzqNZ00000E&u=k00000tpET30RR~QaU&oA000000RR9100000yZ`_I1OV~>00000000000000000000#{d8T0ssyGAPxWk000000000000000$p8QV0ssyGU=9EP000000000000000+yDRo0ssyGunqtK000000000000000@&Et;0RR~Qa3df9000000RR91000000RaF20RR;MKph|e000000000000000C;<Qf0ssyG@D2a~000000000000000Gywnr0RR*LFdZNO000000000000000yZ`_I1OV~>00000000000000000000Qvm<~0RR#JL>2%5000000000000000000001OV~>00000000000000000000VF3UD000pHWD@`Y000000000000000bO8VW0RR>NNF5*m000000000000000eE|Rf000yKKph|e000000000000000jsXAw000yKFdZNO000000000000000p#cB@0RR^OSRWt&000000000000000w*deE5C9ke7$6`3000000000000000Wdr~KAOIKu03aX$000000000000000z5xIL5daVXU=siU000001ONa400000%>e)a5&!@I00000000000000000000^8o+=A^;8m5D@?X00000mjD0&00000WdZ;IA^-pY00000000000000000000fdT*k5&#YWPzwM600000VgdjF00000h5`Tp5&!@I00000000000000000000&H?}cA^;8mun_<N00000D**ri00000MFRi;5ds(h2p}K;000000000000000QUd@05&!@I00000000000000000000p8x;=5&#YW01p5F00000NdN!<00000Y6AcOAp#fx5Fj7`000002mk;800000JOuy%5&#bXR1*LI000000000000000h64Zq5&!@I00000000000000000000paTE^5&!@I00000000000000000000X#@ZO5&#YW@C^U}00000D*ylh00000v;zPD5&!@I00000000000000000000#{&QW5&!@I00000000000000000000s{{Z55&#PTPznG5000000000000000;{yNy5ds(h7$6`3000000000000000?*jk;5&!@I00000000000000000000OauS`5dawgARr(B000005CH%H00000V*~&I5C9ke03aX$000000000000000i2(or5C9nfcq1SH000000000000000a0CDV5C9nf7$6`3000000000000000d;|ah5&!@I00000000000000000000p#%T`5&#YW;1U1;00000WdHyG00000u>=4B5&!@I00000000000000000000#smNW5&!@I00000000000000000000=L7%%5&!@I00000000000000000000{saI3AOHXW000000000000000000008U+9V5&!@I00000000000000000000G6ett5&#YWP!j+E000000ssI200000LInT-5dawgKp`Li000007y$qP00000SOow85&!@I00000000000000000000cLe|dAOHXW00000000000000000000h6MlsAOHXW00000000000000000000palQ`5dawgU?Ly@000005CH%H00000w*>$I5&!@I0000000000000000000007PFyVRB?&MPYPhaxP<VZ~$LgQ*<#lUtei%baHQVZ*p{BY;SLHNlrOmUuSN0Ut@T9F*jddZf|mJVQgP%bY*g3bZ>G=P-#<iHg;uWbZ>G=X;WcIX+=dvMQlz}FkdxaUvF@8F*RRFbY*g1Y-MwEUukq@az#aUR9{m$UsNz(R54#JX>)R6E;BR$Uq?(&LP1PlUvqV0UrAqIS~+B8Vs&R<Z*_Eb0AE^DbWAv3Uukb?ZfSG?V{&wJbaiHCE@J>>WpZU_X>)XCa$j_9Ut?@<Ze?=-UteTzUuSG@Vqt7wWOQ$Gb6;U~cmQK>ZE$R5bY)~NH#Rvq0AF8ZZ(nC@Z(?C=Uu1M|a&uo{b$DN9X>Ms>VRCX|d0%C2baHtBW^!R|WnW}<ZEbk~UteZ&VQpn!WOZ$Ad0%O6X>?y<a&lpLUuAA|a(Mt>Uq(_vO+{ZtPDEc{0AF86PE}t;NMA-$K}|(pNJLTqUqo3>K}|_R0AF8eZfSI1VRCX|d0%C2WB^}ZX>MtBUtw}`VR>J3bYXII0AEK;PeMUVUr$CxQ$<u?R6#;aMPC44Wn^J=VE|uAPhWF%WNB_+b#rB80AE^DbTKzyUvy}4Z+Bl}VPs!nY;131c0fQ!Oi4mRSXf^(E;ImNT2pi}HeX+9ZgXXFbZKvHUvqDAbV*J*Utec#bzft6criC$Uv6)5ZDDL*X>?_BVRUbDNl<B1bT)QnV{~tFNoiAINohqzMMX|iFkdxaUvF@8F*RRFbY*g1Y-MwEUukq@az#aUR9{m$UsNz(0AF8Ycwt{=X>MU`X?kTqKu1hTLPK9NE;24P0BvDuZUA3eQ*<<CZe(mpV^ef7F=J?9a$j_EVQF-8Nn=GtQd4v>Gh$(LX=7h+b98cLVQooNUsNz(MN>9kKtM-KNkT(dSYI<PGyq>(Q*<#iUteKlYISpTUub1va7j)%Utec#bzft6criC$Uv6)5ZDDL*X>?_BVRUbDNl<B1bT)QnV{~tFNoiAINohqzMMZ3BPE#;nHD6zEaC0#=UrBUja$js^b8}y5bY*fyMRrtQR4`vtL0?ocUsN(*0AF8Zb8la0VQyq>WdL7VPE%=eb45~VKtM-KNkT(dSYI<PGyp_bE^=jNE?-|~cz9oMWpZ<GZeeU`ba`KPFaTd)V|Za-VRU79X>>q9M@&gVLtip3GA=a$Us_~rP<B8-M@&gVLs(c}GcGg$Us`T=Z9qUrOi4mRSXf^(E;ImNUvqR}V{2byXlq|)VQFkYKu1hTLPK9NE;ImNUsO#)UqwztUta)UT2pi}HeX+Fb98cLVQpV&ZgXXFbV*}VbTKhwXkl_+baG*7baP2#MMY9mbTKnxVRLC?UvG1Ca%Ev{NmO4{FkeMeHeXOnQ!`&|KtM-KNkT(dSYI<PG%h&+Us_XiG-GddbU;8yOi4mRSXf^(E;ImNUu0o)VPA7}VRCc;UteN#b6<0GVRCc;Us_I6bU0~mb6;X%b7eG1ZfSHwF-3MjKu1hTLPJ<sUo$Q=0AF8hX<}nvV{>(1X>MtB0BvP$ZEtpEKtM-KNkT(kGA=SMH2_~<XLxvDaAk6HZ*F01X>@sCb}&FdLs(crLP=jSE;9gMT251MY;#3vKtM-KNkT(dSYI<PGyq>oR83!GWpZU_X>)XCa#T%2Y;SI5RAFLlWdL7QZg**JWM5Kcb9HTHKtM-BLtis4FaTd)Y-wU+Ut@E1UuJ1;X#ihZQ*<+9X>LG3M@&gVLs(c}GcGg$Uter#Vq;%(bYXIIUu|J&Za_dsOi4mRUotK-E;RsOUuSJ^ZeMeBVRCd|UjSc8R83!UWoKz~bY*f>O+##NZe>(qVr*pqUs_XiG-G9QazH>wOi4mRSXf^(E;ImNT251RIB9QlUt(c%Wi&}{X>>#}MRq_yM@&gVLs(c}GcGg$04{TRZFFH`04{TMa&%#004{TAb98caVPXI-X>N37a&Q1HZf|sDE<r*`Ep%aL04{ECbY(7QZgnnVb!lv5Eoo!`E@y6aE@)wMXaFu`d2VxgZ2&H0d2VxbasV!8ZgnnpWpZ<AZ*BlCXKr;ac4cyNX>V>{asV!JWo%(CWO;4?E^=jTVJ>iNbO0`CZfSG?E^usgE@y9a04{W8cys_RW@&C|04{QGWMOn+04`-{UuJS)ZDn6*WO4v5WoTb!a$#*{04`@^V_#)>V`Xr3Uvyz&Y-Ip0X>MtBUtw}`VR-;9W@&C|Utw}`VR-;9WO;63ZE0fwE@WYJVE`^-b8`SLV{dJ3Wo~o;00000000000000000000000000000000000000000000000000000000000000000000000000000000000008vp<R0RR910ssI200000I066w00000I066w000008~^|S0000000000000000RR91000000000000000BLDyZ2LJ#70ssI200000R004100000R004100000AOHXW0000000000000001ONa4000000000000000F#rGn2LJ#70ssI200000bOHbX00000bOHbX00000Bme*a0000000000000001ONa4000000000000000L;wH)_W%EH0ssI200000m;wL*00000m;wL*00000FaQ7m000001poj5000002mk;8000000000000000P5=M^3jhEB0ssI200000$N~TW00000$N~TW00000C;|Wg000001^@s60RR912mk;8000007ytkO00000RsaA10{{R30ssI200000@B{z=00000@B{z=00000ECK)k0000000000000000RR91000000000000000UH||9|NsAQ0ssI20000090vdZ0000090vdZ00000E&u=k000001poj5000000ssI2000000ssI200000YXATM{{R1P0ssI200000PzL}200000PzL}200000kN^Mx000001^@s60{{R32mk;8000000000000000dH?_b1ONa40ssI200000;0FKz00000;0FKz00000Pyqk{000001poj5000002mk;8000007ytkO00000ga7~l1ONa4LI3~&00000FbMzv00000FbMzv00000AOQdX000001poj57XSbN2mk;8000007ytkO00000jsO4v0RR911^@s600000PznG500000PznG5000007XSbN0000000000000001ONa4000000000000000i2wiq0RR911^@s600000a0&nb00000a0&nb00000&;S4c0000000000000005C8xG000005C8xG00000lmGw#0RR911^@s600000Knnl>00000Knnl>000002mk;80000000000000002mk;8000002mk;800000od5s;0RR911^@s600000PzwM600000PzwM6000000tf&A0000000000000005C8xG000000000000000qW}N^0RR911^@s600000R1*LI00000R1*LI000002><{90000000000000001ONa4000000000000000sQ>@~0RR915&!@I00000U=siU00000U=siU000001ONa40000000000000001ONa4000001ONa400000u>b%70RR910ssI200000WD@`Y00000WD@`Y00000WB>pF0000000000000001ONa4000000000000000zW@LL0RR910ssI200000$P)kn00000$P)kn00000fC2yj0000000000000002mk;8000000000000000$p8QV0RR910ssI200000NEQG900000NEQG9000008UO$Q0000000000000000RR91000000000000000+W-In4gdfE0{{R300000FdZNO00000FdYB@000005C8xG0000000000000002mk;8000002mk;800000=Kufz4*&oF0{{R300000Kph|e00000Kpg-8000002mk;80000000000000002mk;8000002mk;800000^8f$<1^@s60{{R300000NF5*m00000NF4wG000005CQ-I000001^@s6000002mk;8000005C8xG00000m;e9(0RR910{{R300000SRWt&00000SRViY00000r~m)}0000000000000002mk;8000002mk;800000`~Uy|0RR910{{R30000003aX$0000003ZMW000007ytkO0000000000000002mk;80000000000000000s#O32mk;80{{R300000ARr(B000007$5)u00000SOWk6000000000000000AOHXW0000000000000002LS*80RR91FaQ7m0000000000000007$5)u00000DF6Tf0000000000000000RR91000000RR91000000RR910ssI200000000000000000000NFV?J00000C<p)m000008~^|SF8}}l2mk;8000007ytkO000002><{90{{R300000000000000000000a3}x(00000+ywvt0000000000000000RR910000000000000005dZ)H0{{R300000000000000000000OfCQb000005CH%H0000000000000000RR91000000000000000"
open("./kyomu", 'wb').write(base64.b85decode(exe_bin))
subprocess.run(["chmod +x ./kyomu"], shell=True)
subprocess.run(["./kyomu"], shell=True) | 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))
| ^~~~
a.cc:2:1: error: 'import' does not name a type
2 | import base64
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
|
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 <queue>
#include <stack>
#include <set>
#include <bitset>
#include <regex>
#include <random>
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n)for(ll i=0;i<n;++i)
#define exout(x) printf("%.10f\n", x)
const double pi = acos(-1.0);
const ll MOD = 1000000007;
const ll INF = 1e18;
const ll MAX_N = 201010;
//組み合わせの余りを求める
ll fac[MAX_N], finv[MAX_N], inv[MAX_N];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX_N; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
// 二項係数計算
long long COM(ll n, ll k) {
if (n < k) return 0;
if (n < 0 || k < 0) return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
//最大公約数
ll gcd(ll x, ll y) {
return y ? gcd(y, x % y) : x;
}
ll lcm(ll x, ll y) {
if (x == 0 || y == 0)return 0;
return (x / gcd(x, y) * y);
}
ll dx[4] = { 0,0,-1,1 };
ll dy[4] = { -1,1,0,0 };
char notes[110][10];
ll treasure[3030][3030];
ll dp[3030][3030][4];
//long longしか使わない
//素数は1より大きい
//lower_boundは指定したkey以上の要素の一番左のイテレータをかえす
//upper_boundは指定したkeyより大きい要素の一番左のイテレータをかえす
int main() {
ll n;
cin >> n;
vector<ll>a(n);
vector<ll>card(1);
card[0] = 1;
rep(i, n) {
cin >> a[i];
}
sort(a.begin(), a.end());
ll kaburi = 1;
rep(i, n-2) {
if (a[i] == a[i + 1]) {
kaburi++;
}
else {
if (kaburi % 2==0) {
a.erase(a.begin() + i + 2);
n--;
}
kaburi = 1;
}
}
ll k = a.size();
ll ans = 1;
rep(i, k-1) {
if (a[i] != a[i + 1])ans++;
}
cout << ans << endl;
return 0;
}
#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 <queue>
#include <stack>
#include <set>
#include <bitset>
#include <regex>
#include <random>
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n)for(ll i=0;i<n;++i)
#define exout(x) printf("%.10f\n", x)
const double pi = acos(-1.0);
const ll MOD = 1000000007;
const ll INF = 1e18;
const ll MAX_N = 201010;
//組み合わせの余りを求める
ll fac[MAX_N], finv[MAX_N], inv[MAX_N];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX_N; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
// 二項係数計算
long long COM(ll n, ll k) {
if (n < k) return 0;
if (n < 0 || k < 0) return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
//最大公約数
ll gcd(ll x, ll y) {
return y ? gcd(y, x % y) : x;
}
ll lcm(ll x, ll y) {
if (x == 0 || y == 0)return 0;
return (x / gcd(x, y) * y);
}
ll dx[4] = { 0,0,-1,1 };
ll dy[4] = { -1,1,0,0 };
char notes[110][10];
ll treasure[3030][3030];
ll dp[3030][3030][4];
//long longしか使わない
//素数は1より大きい
//lower_boundは指定したkey以上の要素の一番左のイテレータをかえす
//upper_boundは指定したkeyより大きい要素の一番左のイテレータをかえす
int main() {
ll n;
cin >> n;
vector<ll>a(n);
vector<ll>card(1);
card[0] = 1;
rep(i, n) {
cin >> a[i];
}
sort(a.begin(), a.end());
ll kaburi = 1;
rep(i, n-2) {
if (a[i] == a[i + 1]) {
kaburi++;
}
else {
if (kaburi % 2==0) {
a.erase(a.begin() + i + 2);
n--;
}
kaburi = 1;
}
}
ll k = a.size();
ll ans = 1;
rep(i, k-1) {
if (a[i] != a[i + 1])ans++;
}
cout << ans << endl;
return 0;
}
| 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 = 1000000007;
| ^~~
a.cc:31:10: note: 'const ll MOD' previously defined here
31 | const ll MOD = 1000000007;
| ^~~
a.cc:137:10: error: redefinition of 'const ll INF'
137 | const ll INF = 1e18;
| ^~~
a.cc:32:10: note: 'const ll INF' previously defined here
32 | const ll INF = 1e18;
| ^~~
a.cc:138:10: error: redefinition of 'const ll MAX_N'
138 | const ll MAX_N = 201010;
| ^~~~~
a.cc:33:10: note: 'const ll MAX_N' previously defined here
33 | const ll MAX_N = 201010;
| ^~~~~
a.cc:141:4: error: redefinition of 'll fac [201010]'
141 | ll fac[MAX_N], finv[MAX_N], inv[MAX_N];
| ^~~
a.cc:36:4: note: 'll fac [201010]' previously declared here
36 | ll fac[MAX_N], finv[MAX_N], inv[MAX_N];
| ^~~
a.cc:141:16: error: redefinition of 'll finv [201010]'
141 | ll fac[MAX_N], finv[MAX_N], inv[MAX_N];
| ^~~~
a.cc:36:16: note: 'll finv [201010]' previously declared here
36 | ll fac[MAX_N], finv[MAX_N], inv[MAX_N];
| ^~~~
a.cc:141:29: error: redefinition of 'll inv [201010]'
141 | ll fac[MAX_N], finv[MAX_N], inv[MAX_N];
| ^~~
a.cc:36:29: note: 'll inv [201010]' previously declared here
36 | ll fac[MAX_N], finv[MAX_N], inv[MAX_N];
| ^~~
a.cc:142:6: error: redefinition of 'void COMinit()'
142 | void COMinit() {
| ^~~~~~~
a.cc:37:6: note: 'void COMinit()' previously defined here
37 | void COMinit() {
| ^~~~~~~
a.cc:154:11: error: redefinition of 'long long int COM(ll, ll)'
154 | long long COM(ll n, ll k) {
| ^~~
a.cc:49:11: note: 'long long int COM(ll, ll)' previously defined here
49 | long long COM(ll n, ll k) {
| ^~~
a.cc:161:4: error: redefinition of 'll gcd(ll, ll)'
161 | ll gcd(ll x, ll y) {
| ^~~
a.cc:56:4: note: 'll gcd(ll, ll)' previously defined here
56 | ll gcd(ll x, ll y) {
| ^~~
a.cc:165:4: error: redefinition of 'll lcm(ll, ll)'
165 | ll lcm(ll x, ll y) {
| ^~~
a.cc:60:4: note: 'll lcm(ll, ll)' previously defined here
60 | ll lcm(ll x, ll y) {
| ^~~
a.cc:170:4: error: redefinition of 'll dx [4]'
170 | ll dx[4] = { 0,0,-1,1 };
| ^~
a.cc:65:4: note: 'll dx [4]' previously defined here
65 | ll dx[4] = { 0,0,-1,1 };
| ^~
a.cc:171:4: error: redefinition of 'll dy [4]'
171 | ll dy[4] = { -1,1,0,0 };
| ^~
a.cc:66:4: note: 'll dy [4]' previously defined here
66 | ll dy[4] = { -1,1,0,0 };
| ^~
a.cc:172:6: error: redefinition of 'char notes [110][10]'
172 | char notes[110][10];
| ^~~~~
a.cc:67:6: note: 'char notes [110][10]' previously declared here
67 | char notes[110][10];
| ^~~~~
a.cc:173:4: error: redefinition of 'll treasure [3030][3030]'
173 | ll treasure[3030][3030];
| ^~~~~~~~
a.cc:68:4: note: 'll treasure [3030][3030]' previously declared here
68 | ll treasure[3030][3030];
| ^~~~~~~~
a.cc:174:4: error: redefinition of 'll dp [3030][3030][4]'
174 | ll dp[3030][3030][4];
| ^~
a.cc:69:4: note: 'll dp [3030][3030][4]' previously declared here
69 | ll dp[3030][3030][4];
| ^~
a.cc:180:5: error: redefinition of 'int main()'
180 | int main() {
| ^~~~
a.cc:75:5: note: 'int main()' previously defined here
75 | int main() {
| ^~~~
|
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/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
164 | __is_null_pointer(std::nullptr_t)
| ^
/usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)'
159 | __is_null_pointer(_Type)
| ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std'; did you mean 'nullptr_t'?
164 | __is_null_pointer(std::nullptr_t)
| ^~~~~~~~~
In file included from /usr/include/c++/14/cstddef:50,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:443:29: note: 'nullptr_t' declared here
443 | typedef decltype(nullptr) nullptr_t;
| ^~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64:
/usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'; did you mean 'nullptr_t'?
666 | struct is_null_pointer<std::nullptr_t>
| ^~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:443:29: note: 'nullptr_t' declared here
443 | typedef decltype(nullptr) nullptr_t;
| ^~~~~~~~~
/usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid
666 | struct is_null_pointer<std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid
670 | struct is_null_pointer<const std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid
674 | struct is_null_pointer<volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid
678 | struct is_null_pointer<const volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^
/usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1438 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid
1438 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared
1440 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope
1441 | struct rank<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid
1441 | struct rank<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared
2086 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope
2087 | struct remove_extent<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid
2087 | struct remove_extent<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared
2099 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope
2100 | struct remove_all_extents<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid
2100 | struct remove_all_extents<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared
2171 | template<std::size_t _Len>
| ^~~
/usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope
2176 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^~~~
/usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^
/usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope
2202 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope
2203 | struct __attribute__((__aligned__((_Align)))) { } __align;
| ^~~~~~
In file included from /usr/include/c++/14/bits/stl_tempbuf.h:59,
from /usr/include/c++/14/bits/stl_algo.h:69,
from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive]
132 | __attribute__((__externally_visible__));
| ^
/usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~~~
/usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive]
134 | __attribute__((__externally_visible__));
| |
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(s.length() - 1) + k;
cout << s << endl;
} | 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 | if(s.size%2){
| ~~^~~~
| ()
|
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枚抜き出し、最大と最小を取り除く
//残ったカードが互いに異なるようにするには、最小で何回操作を行えばよいか
int main(){
int N;
cin >> N;
int cnt = 0;
vector <int> a(100001,0);
for(int i = 0; i < N; ++i)
{
int tmp;
cin >> tmp;
--tmp;
if(a[tmp] > 0)++cnt;
++a[tmp];
}
if(cnt % 2 == 1)++cnt;
int res = N - cnt;
cout << res << endl;
return 0;
}
3 5 2 8 6 11 1 | 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()
#define isvisiblechar(c) (0x21 <= (c) && (c) <= 0x7E)
#define cin scanner
#define cout printer
namespace {
class MaiScanner {
public:
template <typename T> void input_integer(T &var) {
var = 0;
T sign = 1;
int cc = getchar_unlocked();
for (; cc < '0' || '9' < cc; cc = getchar_unlocked())
if (cc == '-')
sign = -1;
for (; '0' <= cc && cc <= '9'; cc = getchar_unlocked())
var = (var << 3) + (var << 1) + cc - '0';
var = var * sign;
}
inline int c() { return getchar_unlocked(); }
inline MaiScanner &operator>>(int &var) {
input_integer<int>(var);
return *this;
}
inline MaiScanner &operator>>(long long &var) {
input_integer<long long>(var);
return *this;
}
inline MaiScanner &operator>>(string &var) {
int cc = getchar_unlocked();
for (; !isvisiblechar(cc); cc = getchar_unlocked())
;
for (; isvisiblechar(cc); cc = getchar_unlocked())
var.push_back(cc);
return *this;
}
template <typename IT> void in(IT begin, IT end) {
for (auto it = begin; it != end; ++it)
*this >> *it;
}
};
class MaiPrinter {
public:
template <typename T> void output_integer(T var) {
if (var == 0) {
putchar_unlocked('0');
return;
}
if (var < 0)
putchar_unlocked('-'), var = -var;
char stack[32];
int stack_p = 0;
while (var)
stack[stack_p++] = '0' + (var % 10), var /= 10;
while (stack_p)
putchar_unlocked(stack[--stack_p]);
}
inline MaiPrinter &operator<<(char c) {
putchar_unlocked(c);
return *this;
}
inline MaiPrinter &operator<<(int var) {
output_integer<int>(var);
return *this;
}
inline MaiPrinter &operator<<(long long var) {
output_integer<long long>(var);
return *this;
}
inline MaiPrinter &operator<<(char *str_p) {
while (*str_p)
putchar_unlocked(*(str_p++));
return *this;
}
inline MaiPrinter &operator<<(const string &str) {
const char *p = str.c_str();
const char *l = p + str.size();
while (p < l)
putchar_unlocked(*p++);
return *this;
}
template <typename IT> void join(IT begin, IT end, char sep = ' ') {
for (bool b = 0; begin != end; ++begin, b = 1)
b ? *this << sep << *begin : *this << *begin;
}
};
} // namespace
MaiScanner scanner;
MaiPrinter printer;
int main() {
int n, t, sz = 0;
cin >> n;
bitset<100001> bt;
REP(i, n) {
cin >> t;
if (!bt[t]) {
sz++;
bt.set(t);
}
}
cout << sz - (sz % 2 == 0) << endl;
return 0;
}
| 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& {anonymous}::MaiPrinter::operator<<(char)'
65 | inline MaiPrinter &operator<<(char c) {
| ^~~~~~~~
a.cc:65:40: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'char'
65 | inline MaiPrinter &operator<<(char c) {
| ~~~~~^
a.cc:69:24: note: candidate: '{anonymous}::MaiPrinter& {anonymous}::MaiPrinter::operator<<(int)'
69 | inline MaiPrinter &operator<<(int var) {
| ^~~~~~~~
a.cc:69:39: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int'
69 | inline MaiPrinter &operator<<(int var) {
| ~~~~^~~
a.cc:73:24: note: candidate: '{anonymous}::MaiPrinter& {anonymous}::MaiPrinter::operator<<(long long int)'
73 | inline MaiPrinter &operator<<(long long var) {
| ^~~~~~~~
a.cc:73:45: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int'
73 | inline MaiPrinter &operator<<(long long var) {
| ~~~~~~~~~~^~~
a.cc:77:24: note: candidate: '{anonymous}::MaiPrinter& {anonymous}::MaiPrinter::operator<<(char*)'
77 | inline MaiPrinter &operator<<(char *str_p) {
| ^~~~~~~~
a.cc:77:41: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'char*'
77 | inline MaiPrinter &operator<<(char *str_p) {
| ~~~~~~^~~~~
a.cc:82:24: note: candidate: '{anonymous}::MaiPrinter& {anonymous}::MaiPrinter::operator<<(const std::string&)'
82 | inline MaiPrinter &operator<<(const string &str) {
| ^~~~~~~~
a.cc:82:49: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
82 | inline MaiPrinter &operator<<(const string &str) {
| ~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:2:
/usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)'
1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed:
a.cc:109:35: note: '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<_CharT, _Traits>'
109 | cout << sz - (sz % 2 == 0) << endl;
| ^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:109:35: note: couldn't deduce template parameter '_IntegerType'
109 | cout << sz - (sz % 2 == 0) << endl;
| ^~~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:109:35: note: '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<_CharT, _Traits>'
109 | cout << sz - (sz % 2 == 0) << endl;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:109:35: note: '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<_CharT, _Traits>'
109 | cout << sz - (sz % 2 == 0) << endl;
| ^~~~
/usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)'
1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed:
a.cc:109:35: note: '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<_CharT, _Traits>'
109 | cout << sz - (sz % 2 == 0) << endl;
| ^~~~
In file included from /usr/include/c++/14/bits/ios_base.h:46,
from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
from /usr/include/c++/14/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:109:35: note: '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<_CharT, _Traits>'
109 | cout << sz - (sz % 2 == 0) << endl;
| ^~~~
In file included from /usr/include/c++/14/memory:80,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56:
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)'
70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed:
a.cc:109:35: note: '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<_CharT, _Traits>'
109 | cout << sz - (sz % 2 == 0) << endl;
| ^~~~
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:109:35: note: '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<_CharT, _Traits>'
109 | cout << sz - (sz % 2 == 0) << endl;
| ^~~~
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:109:35: note: '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<_CharT, _Traits>'
109 | cout << sz - (sz % 2 == 0) << endl;
| ^~~~
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:109:35: note: '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<char, _Traits>'
109 | cout << sz - (sz % 2 == 0) << endl;
| ^~~~
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:109:35: note: '{anonymous}::MaiPrinter' is not derived from 'std::basic_ostream<char, _Traits>'
109 | cout << sz - (sz % 2 == 0) << endl;
| ^~~~
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& |
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(0); std::ios::sync_with_stdio(false);
struct Init_caller { Init_caller() { Init(); } }caller;
}
#define int LL
#define rep(i,n) for(LL (i)=0;(i)<(n);(i)++)
#define all(a) (a).begin(),(a).end()
#define size(s) ((LL)s.size())
#define F first
#define S second
#define check() cout<<"! ! !"
#define endl "\n"
#define _y() cout<<"Yes"<<endl
#define _Y() cout<<"YES"<<endl
#define _n() cout<<"No"<<endl
#define _N() cout<<"NO"<<endl
#define INT_INF INT_MAX
#define INF LLONG_MAX
#define MOD ((int)pow(10,9)+7)
using namespace std;
using LL = long long;
using st = string;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vd = vector<double>;
using vvd = vector<vd>;
using vvvd = vector<vvd>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<st>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvvb = vector<vvb>;
using qi = queue<int>;
using qc = queue<char>;
using qs = queue<st>;
using si = stack<int>;
using sc = stack<char>;
using ss = stack<st>;
using pi = pair<int, int>;
using ppi = pair<pi, int>;
using mii = map<int, int>;
using mpii = map<pi, int>;
using mib = map<int, bool>;
using mci = map<char, int>;
using msb = map<st, bool>;
using vpi = vector<pi>;
using vppi = vector<ppi>;
using spi = stack<pi>;
using qpi = queue<pi>;
//4,2,8,6,1,7,3,9,5
int dx[] = { -1,0,0,1,-1,-1,1,1,0 };
int dy[] = { 0,1,-1,0,1,-1,1,-1,0 };
void y_n(bool p) {
p ? _y() : _n();
}
void Y_N(bool p) {
p ? _Y() : _N();
}
LL vmax(vi v) {
int n = size(v);
int MAX = 0;
rep(i, n) {
MAX = max(MAX, v[i]);
}
return MAX;
}
LL vmin(vi v) {
int n = size(v);
int MIN = INF;
rep(i, n) {
MIN = min(MIN, v[i]);
}
return MIN;
}
LL vsum(vi v) {
int n = size(v);
int sum = 0;
rep(i, n) {
sum += v[i];
}
return sum;
}
LL gcd(LL a, LL b) {
if (b == 0) {
swap(a, b);
}
LL r;
while ((r = a % b) != 0) {
a = b;
b = r;
}
return b;
}
LL lcm(LL a, LL b) {
return (a / gcd(a, b) * b);
}
bool is_square(int n) {
if ((int)sqrt(n)*(int)sqrt(n) == n) {
return true;
}
else {
return false;
}
}
bool is_prime(int n) {
if (n == 1) {
return false;
}
else {
for (int i = 2; i*i <= n; i++) {
if (n % i == 0) {
return false;
}
}
}
return true;
}
void dec_num(int n, vi &v) {
int a = 2;
v.push_back(1);
v.push_back(n);
while (a*a <= n) {
if (n%a == 0) {
v.push_back(a);
v.push_back(n / a);
}
a++;
}
sort(all(v));
}
void dec_prime(int n, vi &v) {
int a = 2;
while (a*a <= n) {
if (n % a == 0) {
v.push_back(a);
n /= a;
}
else {
a++;
}
}
v.push_back(n);
}
int sieve_prime(LL a, LL b) {
if (a > b)swap(a, b);
vb s(b + 1, true);
int cnt_a = 0, cnt_b = 0;
for (int i = 2; i <= b; i++) {
for (int j = 2; i*j <= b; j++) {
s[i*j] = false;
}
}
for (int i = 2; i <= b; i++) {
if (s[i]) {
//cout << i << " ";
if (i < a) {
cnt_a++;
}
cnt_b++;
}
}
return cnt_b - cnt_a;
}
LL factorial(LL n) {
LL a = 1, ret = 1;
while (a < n) {
a++;
ret *= a;
//ret %= MOD;
}
return ret;
}
const int COMBMAX = 4000;
int comb[COMBMAX+5][COMBMAX+5];
void init_comb() {
comb[0][0] = 1;
rep(i, COMBMAX) {
rep(j, i + 1) {
comb[i + 1][j] += comb[i][j];
comb[i + 1][j] %= MOD;
comb[i + 1][j + 1] += comb[i][j];
comb[i + 1][j + 1] %= MOD;
}
}
}
int combination(int n, int k) {
if (k<0 || k>n)return 0;
else return comb[n][k];
}
const int COMBMODMAX = 510000;
int fac[COMBMODMAX], facinv[COMBMODMAX], inv[COMBMODMAX];
void init_comb_mod() {
fac[0] = fac[1] = 1;
facinv[0] = facinv[1] = 1;
inv[1] = 1;
for (int i = 2; i < COMBMODMAX; i++) {
fac[i] = fac[i - 1] * i%MOD;
inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
facinv[i] = facinv[i - 1] * inv[i] % MOD;
}
}
int comb_mod(int n, int k) {
if (n < k)return 0;
if (n < 0 || k < 0)return 0;
return fac[n] * (facinv[k] * facinv[n - k] % MOD) % MOD;
}
int pow_mod(int x, int n, int p) {
if (n == 0)return 0;
int res = pow_mod(x*x%p, n / 2, p);
if (n % 2 == 1)res = res * x % p;
return res;
}
class UF {
public:
vi par;
vi rank;
UF(int n) {
par.resize(n, -1);
rank.resize(n, 0);
}
int root(int x) {
if (par[x] == -1)return x;
return par[x] = root(par[x]);
}
//xの集合の位数
int order(int x) {
return -par[root(x)];
}
//xとyが同じ集合にいたらfalse、違かったら併合してtrue
bool unite(int x, int y) {
x = root(x);
y = root(y);
if (x == y) {
return false;
}
if (rank[x] < rank[y]) {
par[x] = y;
}
else {
par[y] = x;
if(rank[x]==rank[y])rank[x]++;
}
return true;
}
};
struct edge {
int to;
int cost;
};
using ve = vector<edge>;
using vve = vector<ve>;
/*****************************************************************************/
signed main() {
int n;
cin >> n;
vi a(n);
mii m;
set<int>s;
int cnt = 0;
rep(i, n) {
cin >> a[i];
s.insert(a[i]);
m[a[i]]++;
if (m[a[i]] > 1) {
cnt++;
}
}
if (cnt & 1)cout << size(s) - 1;
else cout << size(s);
return 0;
} | 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_back(a)
#define pop pop_back
#define uni(a) a.erase(unique(a.begin(),a.end()),a.end())
template<class T>
void cou(vector<vector<T>> a){
int b=a.size();
int c=a[0].size();
fo(i,b){
fo(j,c){
cout<<a[i][j];
if(j==c-1)
cout<<endl;
else
cout<<' ';
}
}
}
/*template<>
void cou(vector<vector<char>> a){
int b=a.size();
int c=a[0].size();
fo(i,b){
fo(j,c){
cout<<a[i][j];
if(j==c-1)
cout<<endl;
else
cout<<' ';
}
}
}*/
template<class L>
void ci(vector<vector<L>> a,int b,int c){
fo(i,b){
fo(j,b)
cin>>a[i][j];
}
}
int wari(int a,int b) {
if(a%b==0)
return a/b;
else
return a/b+1;
}
int keta(int a){
double b=a;
b=log10(b);
int c=b;
return c+1;
}
int souwa(int a){
return a*(a+1)/2;
}
int lcm(int a,int b){
int d=a,e=b,f;
if(a<b)
swap(a,b);
int c,m=1;
while(m){
c=a%b;
if(c==0){
f=b;
m--;
}
else{
a=b;
b=c;
}
}
return d*e/f;
}
int gcm(int a,int b){
int d=a,e=b,f;
if(a<b)
swap(a,b);
int c,m=1;
while(m){
c=a%b;
if(c==0){
f=b;
m--;
}
else{
a=b;
b=c;
}
}
return f;
}
bool prime(int a){
if(a<2)
return false;
else if(a==2)
return true;
else if(a%2==0)
return false;
double b=sqrt(a);
for(int i=3;i<=b;i+=2){
if(a%i==0){
return false;
}
}
return true;
}
signed main(){
int a,c=0,d,e;
cin>>a;
vector<int> b(a);
fo(i,a)
cin>>b[i];
Sort(b);
for(int i=0;i<a;i=i){
e=0;
d=b[i];
while(d==b[i]){
e++;
i++;
}
c+=e-1;
}
uni(b);
if(c%2==0)
cout<<b.size()<<endl;
else
cout<<b.sz+1<<endl;
} | 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
| ^
a.cc:137:17: note: in expansion of macro 'sz'
137 | cout<<b.sz+1<<endl;
| ^~
|
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<<endl;
}
| 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 scope
10 | b[i]=0;
| ^
a.cc:13:6: error: 'a' was not declared in this scope
13 | cin>>a[i];
| ^
a.cc:14:5: error: 'b' was not declared in this scope
14 | b[a[i]]++;
| ^
|
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/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
257 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: template argument deduction/substitution failed:
a.cc:15:16: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'std::set<int>::size_type' {aka 'long unsigned int'})
15 | cout << max(1, (s.size()+1)/2*2-1) << '\n';
| ~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
5706 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
5716 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: template argument deduction/substitution failed:
a.cc:15:16: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
15 | cout << max(1, (s.size()+1)/2*2-1) << '\n';
| ~~~^~~~~~~~~~~~~~~~~~~~~~~
|
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; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define MOD 1000000007
#define INF 1000000000
#define LLINF 4000000000000000000
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
#pragma endregion
//#define __DEBUG__
#ifdef __DEBUG__
#define dump(x) cerr << #x << " = " << (x) << " [" << __LINE__ << ":" << __FUNCTION__ << "] " << endl;
// vector出力
template<typename T>
ostream& operator << (ostream& os, vector<T>& v) {
os << "{";
REP(i, (int)v.size()) { os << v[i] << (i < v.size() - 1 ? ", " : ""); }
os << "}";
return os;
}
// pair出力
template<typename T, typename U>
ostream& operator << (ostream& os, pair<T, U>& p) {
return os << "(" << p.first << ", " << p.second << ")";
}
// map出力
template<typename T, typename U>
ostream& operator << (ostream& os, map<T, U>& map_var) {
os << "{";
for (auto itr = map_var.begin(); itr != map_var.end(); itr++) {
os << "(" << itr->first << ", " << itr->second << ")";
itr++;
if (itr != map_var.end()) os << ", ";
itr--;
}
os << "}";
return os;
}
// set 出力
template<typename T>
ostream& operator << (ostream& os, set<T>& set_var) {
os << "{";
for (auto itr = set_var.begin(); itr != set_var.end(); itr++) {
os << *itr;
++itr;
if (itr != set_var.end()) os << ", ";
itr--;
}
os << "}";
return os;
}
#endif
int main() {
cin.tie(0); ios::sync_with_stdio(false);
int N, cnt = 0,ans = 0; cin >> N;
VI A(100000, 0);
REP(i, N) {
int a;
scanf_s("%d", &a);
a--;
A[a]++;
}
REP(i, 100000) {
if (A[i] == 0) continue;
ans++;
if (A[i] % 2 == 0) {
cnt++;
}
}
if (cnt % 2 == 1) ans--;
cout << ans << endl;
getchar(); getchar();
} | 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 - (even%2);
cout << ans << endl;
}
| 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 - (even%2);
cout << ans << endl;
}
| 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>(int, int)' (built-in)
5 | cin > n;
| ~~~~^~~
a.cc:5:7: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1176:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1176 | operator>(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1176:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
5 | cin > n;
| ^
/usr/include/c++/14/bits/regex.h:1236:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1236 | operator>(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1236:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
5 | cin > n;
| ^
/usr/include/c++/14/bits/regex.h:1329:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1329 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1329:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
5 | cin > n;
| ^
/usr/include/c++/14/bits/regex.h:1403:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1403 | operator>(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1403:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
5 | cin > n;
| ^
/usr/include/c++/14/bits/regex.h:1497:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1497 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1497:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
5 | cin > n;
| ^
/usr/include/c++/14/bits/regex.h:1573:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1573 | operator>(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1573:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
5 | cin > n;
| ^
/usr/include/c++/14/bits/regex.h:1673:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1673 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1673:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
5 | cin > n;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>'
5 | cin > n;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
5 | cin > n;
| ^
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
5 | cin > n;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1714 | operator>(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
5 | cin > n;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1774 | operator>(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
5 | cin > n;
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
695 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
5 | cin > n;
| ^
/usr/include/c++/14/string_view:702:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
702 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
5 | cin > n;
| ^
/usr/include/c++/14/string_view:710:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
5 | cin > n;
| ^
/usr/include/c++/14/bits/basic_string.h:3915:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed:
a.cc:5:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
5 | cin > n;
| ^
/usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3929 | operator>(const bas |
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++) {
cin >> t;
a[t]++;
}
sort(a, a +100001, greater<int>());
t = 0;
//2m+1を1にする
for (int i = 1; 2 * i + 1 <= 100000; i++) {
for (int j = 0; j < n; j++) {
if (a[j] == 2 * i + 1)
a[j] = 1;
}
}
//4以上を2にする
for (int i = 0; i < n; i++) {
if (a[i] >= 4)
a[i] = 2;
}
sort(a, a +100001, greater<int>());
//2のうち1にできるものをさがす
for (int i = 0; i < n; i++) {
if (a[i] == 2 && a[i + 1] == 2) {
a[i] = 1;
a[i + 1] = 1;
}
}
//2枚残っているものがないかさがす
for (int i = 0; i < n; i++) {
if (a[i] == 2) {
a[i] = 0;
}
}
//数える
c = 0;
for (int i = 0; i < n; i++) {
if (a[i] >= 1)
c++;
}
cout << c << endl;
} | 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 (int i = 0; i < n; i++) {
cin >> t;
a[t]++;
}
sort(a, a +100001, greater<int>());
t = 0;
//2m+1を1にする
for (int i = 1; 2 * i + 1 <= 100000; i++) {
for (int j = 0; j < n; j++) {
if (a[j] == 2 * i + 1)
a[j] = 1;
}
}
//4以上を2にする
for (int i = 0; i < n; i++) {
if (a[i] >= 4)
a[i] = 2;
}
sort(a, a +100001, greater<int>());
//2のうち1にできるものをさがす
for (int i = 0; i < n; i++) {
if (a[i] == 2 && a[i + 1] == 2) {
a[i] = 1;
a[i + 1] = 1;
}
}
//2枚残っているものがないかさがす
for (int i = 0; i < n; i++) {
if (a[i] == 2) {
a[i] = 0;
}
}
//数える
c = 0;
for (int i = 0; i < n; i++) {
if (a[i] >= 1)
c++;
}
cout << c << endl;
} | 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 << endl;
return 0;
} | 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++){
ans++;
if(ite -> second % 2 == 0){
cnt++;
}
if(ite -> second > 2){
res++;
}
}
if(cnt % 2 && res > 0){
ans -= 1;
}
cout << ans << endl;
return 0;
}
| 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.begin(),num.end(),greater<int>());
int cnt=0;
for(int i=0;i<=n;i++){
if(num[i]<=1)break;
if(num[i]%3==0)num[i]=0;
if(num[i]%3==2){num[i]=1;cnt++;}
if(num[i]%3==1)num[i]=1;
}
int ans=0;
for(int i=0;i<=n;i++)
ans+=num[i];
cout<ans-cnt<<endl;
return 0;
} | 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<<n&1?c-1:c;}
| ^~~~
a.cc: In function 'int main()':
a.cc:2:116: error: no match for 'operator&' (operand types are 'std::basic_ostream<char>' and 'int')
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;}
| ~~~~~~~~~~~~^~
| | |
| | int
| std::basic_ostream<char>
a.cc:2:116: note: candidate: 'operator&(int, int)' (built-in)
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:116: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/cstddef:141:3: note: candidate: 'constexpr std::byte std::operator&(byte, byte)'
141 | operator&(byte __l, byte __r) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:141:18: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::byte'
141 | operator&(byte __l, byte __r) noexcept
| ~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:84:3: note: candidate: 'constexpr std::_Ios_Fmtflags std::operator&(_Ios_Fmtflags, _Ios_Fmtflags)'
84 | operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:84:27: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Fmtflags'
84 | operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:134:3: note: candidate: 'constexpr std::_Ios_Openmode std::operator&(_Ios_Openmode, _Ios_Openmode)'
134 | operator&(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:134:27: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Openmode'
134 | operator&(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:181:3: note: candidate: 'constexpr std::_Ios_Iostate std::operator&(_Ios_Iostate, _Ios_Iostate)'
181 | operator&(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:181:26: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Iostate'
181 | operator&(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~^~~
|
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:14: error: 'i' 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:16: error: 'a' 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: 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<<n&1?c-1:c;}
| ^~~~
a.cc:2:1: warning: second argument of 'int main(int, int, int, int*)' should be 'char **' [-Wmain]
a.cc:2:1: warning: third argument of 'int main(int, int, int, int*)' should probably be 'char **' [-Wmain]
a.cc:2:1: warning: 'int main(int, int, int, int*)' takes only zero or two arguments [-Wmain]
a.cc: In function 'int main(int, int, int, int*)':
a.cc:2:61: error: 'i' was not declared in this scope
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:63: error: 'c' was not declared in this scope
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:67: error: 'a' was not declared in this scope
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:79: error: 'i' was not declared in this scope
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:96: error: 'a' was not declared in this scope
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:115: error: no match for 'operator&' (operand types are 'std::basic_ostream<char>' and 'int')
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;}
| ~~~~~~~~~~~~^~
| | |
| | int
| std::basic_ostream<char>
a.cc:2:115: note: candidate: 'operator&(int, int)' (built-in)
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:115: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/cstddef:141:3: note: candidate: 'constexpr std::byte std::operator&(byte, byte)'
141 | operator&(byte __l, byte __r) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:141:18: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::byte'
141 | operator&(byte __l, byte __r) noexcept
| ~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:84:3: note: candidate: 'constexpr std::_Ios_Fmtflags std::operator&(_Ios_Fmtflags, _Ios_Fmtflags)'
84 | operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:84:27: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Fmtflags'
84 | operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:134:3: note: candidate: 'constexpr std::_Ios_Openmode std::operator&(_Ios_Openmode, _Ios_Openmode)'
134 | operator&(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:134:27: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Openmode'
134 | operator&(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:181:3: note: candidate: 'constexpr std::_Ios_Iostate std::operator&(_Ios_Iostate, _Ios_Iostate)'
181 | operator&(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:181:26: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'std::_Ios_Iostate'
181 | operator&(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~^~~
a.cc:2:118: error: 'c' was not declared in this scope
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;}
| ^
|
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,char const* argv[])
{
int count=0;
cin >> n;
vector<int> a(n,0);
rep(i,n)
{
scanf("%d",&a[i]);
}
map<int, int> mp;
for(int i=0;i<n;i++)
{
mp[a[i]]++;
}
int k=mp.size();
for(auto itr = mp.begin(); itr != mp.end(); itr++)
{
count+=itr->second - 1;
}
while(count-2>0)
{
count-=2;
}
if(count ==1)
{
cout << k-1 << endl;
return 0;
}
else
{
cout << k << endl;
return 0;
}
| 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++)
{
if(C[i] != 0)
{
sum += C[i] - 1;
}
}
printf("%d\n",K - sum % 2);
return 0;
}
| 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 << endl;
} else {
cout << n - dup - 1 << endl;
}
}
| 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.cc:11:10: error: expected primary-expression before 'int'
11 | vector<int> vs(n);
| ^~~
a.cc:14:16: error: 'vs' was not declared in this scope
14 | cin >> vs[i];
| ^~
a.cc:17:8: error: 'vs' was not declared in this scope
17 | sort(vs.begin(), vs.end());
| ^~
|
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: candidate: 'operator==(int, int)' (built-in)
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ~~~~~~~~~~~~^~~~
a.cc:16:13: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::fpos<_StateT>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::allocator<_CharT>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/string:48:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
629 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
637 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/bits/basic_string.h:3755:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
/usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3819 | operator==(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2558 | operator==(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
from /usr/include/c++/14/bits/basic_ios.h:37,
from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)'
234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
| ^~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed:
a.cc:16:16: note: 'std::basic_ostream<char>' is not derived from 'const std::istreambuf_iterator<_CharT, _Traits>'
16 | cout << k%2 == 0 ? cnt : cnt-1 << endl;
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/syste |
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);
// freopen("/Volumes/4HOPE/Dropbox/17Todai/CodeJam/R1C-2015-C/out.txt","w",stdout);
scanf("%d",&n);
memset(map,0,sizeof(map));
int k;
int sum = n;
for(int i=0;i<n;i++){
scanf("%d",&k);
map[k] ++;
if(map[k] >= 3){
map[k]-=2;
sum-=2;
}
}
int cnt=0;
for(int i=1;i<=100000;i++){
if(map[i] >= 2){
cnt ++;
if(cnt == 2){
sum-=2;
cnt=0;
}
}
}
printf("%d",sum);
return 0;
}
| 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>
+++ |+#include <cstring>
11 |
|
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);
// freopen("/Volumes/4HOPE/Dropbox/17Todai/CodeJam/R1C-2015-C/out.txt","w",stdout);
scanf("%d",&n);
memset(map,0,sizeof(map));
int k;
int sum = n;
for(int i=0;i<n;i++){
scanf("%d",&k);
map[k] ++;
if(map[k] >= 3){
map[k]-=2;
sum-=2;
}
}
int cnt=0;
for(int i=1;i<=100000;i++){
if(map[i] >= 2){
cnt ++;
if(cnt == 2){
sum-=2;
cnt=0;
}
}
}
printf("%d",sum);
return 0;
}
| 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>
+++ |+#include <cstring>
10 |
|
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;
| ^~
a.cc:17:22: error: 'ans' was not declared in this scope; did you mean 'abs'?
17 | printf("%d\n",n-ans-(ans%2));
| ^~~
| abs
|
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) scanf("%d",&x),mp[x]++;
| ^~
a.cc:15:12: error: 'map' was not declared in this scope
15 | for (map<int,int>::iterator it=mp.begin();it!=mp.end();++it)
| ^~~
a.cc:15:12: note: suggested alternatives:
In file included from /usr/include/c++/14/map:63,
from a.cc:3:
/usr/include/c++/14/bits/stl_map.h:102:11: note: 'std::map'
102 | class map
| ^~~
/usr/include/c++/14/map:89:13: note: 'std::pmr::map'
89 | using map
| ^~~
a.cc:15:16: error: expected primary-expression before 'int'
15 | for (map<int,int>::iterator it=mp.begin();it!=mp.end();++it)
| ^~~
a.cc:15:49: error: 'it' was not declared in this scope; did you mean 'int'?
15 | for (map<int,int>::iterator it=mp.begin();it!=mp.end();++it)
| ^~
| int
a.cc:15:53: error: 'mp' was not declared in this scope
15 | for (map<int,int>::iterator it=mp.begin();it!=mp.end();++it)
| ^~
a.cc:16:10: error: 'ans' was not declared in this scope; did you mean 'abs'?
16 | ans+=it->se-1;
| ^~~
| abs
a.cc:17:22: error: 'ans' was not declared in this scope; did you mean 'abs'?
17 | printf("%d\n",n-ans-(ans%2));
| ^~~
| abs
|
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);
return false;
}
}
}
return true;
}
int main () {
long long ans = 0;
scanf("%ld", &n);
for (long long i = 0; i < n; ++i) {
scanf("%ld", &A[i]);
}
while (!whatever(A)) {
};
ans = (pairs % 2 == 0) ? pairs / 2 : (pairs / 2) + 1;
cout << ans << endl;
return 0;
}
| 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:66,
from /usr/include/c++/14/functional:64,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = long long int; _Alloc = std::allocator<long long int>; iterator = std::vector<long long int>::iterator; const_iterator = std::vector<long long int>::const_iterator]'
1536 | erase(const_iterator __position)
| ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:28: note: no known conversion for argument 1 from 'long long int' to 'std::vector<long long int>::const_iterator'
1536 | erase(const_iterator __position)
| ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = long long int; _Alloc = std::allocator<long long int>; iterator = std::vector<long long int>::iterator; const_iterator = std::vector<long long int>::const_iterator]'
1564 | erase(const_iterator __first, const_iterator __last)
| ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate expects 2 arguments, 1 provided
a.cc:15:40: error: no matching function for call to 'std::vector<long long int>::erase(long long int&)'
15 | A.erase(ii);
| ~~~~~~~^~~~
/usr/include/c++/14/bits/stl_vector.h:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = long long int; _Alloc = std::allocator<long long int>; iterator = std::vector<long long int>::iterator; const_iterator = std::vector<long long int>::const_iterator]'
1536 | erase(const_iterator __position)
| ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:28: note: no known conversion for argument 1 from 'long long int' to 'std::vector<long long int>::const_iterator'
1536 | erase(const_iterator __position)
| ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = long long int; _Alloc = std::allocator<long long int>; iterator = std::vector<long long int>::iterator; const_iterator = std::vector<long long int>::const_iterator]'
1564 | erase(const_iterator __first, const_iterator __last)
| ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate expects 2 arguments, 1 provided
|
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;
typedef pair<int, int> P;
typedef pair<P, int> PP;
int main(void){
int N; cin >> N;
int cnt[MAX];
set<int> st;
memset(cnt,0,sizeof(cnt));
int odd = 0;
long int b;
rep(i,N){
cin >> b;
st.insert(b);
cnt[b] += 1;
if(cnt[b] % 2 == 1 && cnt[b] >= 2) {
odd -= 1;
}else if(cnt[b] % 2 == 0) {
odd += 1;
}
}
if(odd % 2 == 0){
cout << N - (N - st.size()) << endl;
}else{
cout << N - (N - st.size()) - 1 << endl;
}
return 0;
} | 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 | using namespace std;
|
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);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x) cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
//constants
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int INF = 1<<28;
int main(int argc, char **argv) {
int N;
cin >> N;
vector<int> A;
A.resize(100001, 0);
int start=INF, end=0;
REP(i, N){
int a;
cin >> a;
A[a]++;
if (A[a] > 1 and a < start)
start = a;
if (A[a] > 1 and a > end)
end = a;
}
if (start==INF)
goto end;
while(start!=end){
//debug(start);
//debug(end);
A[start]--;
A[end]--;
if (A[start] == 1){
int i;
for(i = start+1; i < end+1; i++){
if(A[i] > 1){
start = i;
break;
}
}
if(i==end+1)
break;
}
if (A[end] == 1){
for(int i = end-1; i >= start; i--)
if(A[i] > 1){
end = i;
break;
}
}
}
int ans = 0;
while(A[start] > 2)
A[start] -= 2;
if (A[start] == 2){
A[start] = 1;
ans--;
}
end:
REP(i, 100001)
if (A[i] == 1){
//cout << i << endl;
ans++;
}
cout << ans << endl;
return 0;
}
| 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(use[a[i]]!=1){
use[a[i]]=1;
na[a[i]]=na[a[i]]%2==1?1:2;
if(na[a[i]]==1) res++;
if(na[a[i]]==2){
res++;
m++;
}
}
}
if(m%2==1) res--;
cout<<res<<endl;
return 0;
} | 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 = set.size();
if(a%2==1) {
cout << a << endl;
}else{
cout << a-1 << endl;
}
} | 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.push((it.second));
while(true){
if(Q.top() == 1)
break;
n-=2;
if(Q.size() == a){
int a = Q.top();
Q.pop();
Q.push(a - 2);
continue;
}
int a = Q.top();
Q.pop();
int b = Q.top();
Q.pop();
a--;
b--;
if(a)
Q.push(a);
if(b)
Q.push(b);
}
cout << n << endl;
return 0;
}
| 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(Q.size() == a){
| ^
|
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 probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | int N, d;
|
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(); qr=read();
for (reg int i=1;i<=qr;)
{
int d=qr/i,j=qr/d,k=(ql-1)/d;
ans[max(k+1,i)]++; ans[j+1]--;
i=j+1;
}
}
for (reg int i=1;i<=n;i++)
{
ans[i]+=ans[i-1];
printf("%d\n",ans[i]);
}
return 0;
} | 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 'register' storage class specifier [-Wregister]
22 | for (reg int i=1;i<=qr;)
| ^
a.cc:29:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
29 | for (reg int i=1;i<=n;i++)
| ^
|
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];
vector<pair<int, int> > qu;
void update(int i, int x)
{
for(; i>0; i-=i&-i) bit[i] += x;
}
int get(int i)
{
int res =0 ; for(; i<=m; i+=i&-i)
res += bit[i]; return res;
}
int main()
{
ios::sync_with_stdio(); cin.tie(0);
///freopen("a.inp","r",stdin);
cin >> n >> m;
FOR(i, 1, n) {
int l, r; cin >> l >> r;
FOR(j, 2, sqrt(m)) if (l <= r/j*j) ans[j] += 1;
qu.pb(mp(l, open));
qu.pb(mp(r, close+l));
}
FOR(j, sqrt(m)+1, m) for(int x=j; x<=m; x+=j) qu.pb(mp(x, j));
sort(qu.begin(), qu.end());
FOR(i, 0, qu.size()-1)
if (qu[i].y == open) {
update(qu[i].x, 1);
} else
if (qu[i].y > close) {
update(qu[i].y-close, -1);
} else {
ans[qu[i].y] += get(qu[i].x-qu[i].y+1);
}
ans[1] = n;
FOR(i, 1, m) cout << ans[i] << '\n';
}
| 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)
| ^
a.cc:39:12: error: 'sqrt' was not declared in this scope
39 | FOR(j, sqrt(m)+1, m) for(int x=j; x<=m; x+=j) qu.pb(mp(x, j));
| ^~~~
a.cc:11:32: note: in definition of macro 'FOR'
11 | #define FOR(i, a, b) for(int i=a, _n=b; i<=_n; ++i)
| ^
a.cc:11:44: error: '_n' was not declared in this scope; did you mean 'n'?
11 | #define FOR(i, a, b) for(int i=a, _n=b; i<=_n; ++i)
| ^~
a.cc:39:5: note: in expansion of macro 'FOR'
39 | FOR(j, sqrt(m)+1, m) for(int x=j; x<=m; x+=j) qu.pb(mp(x, j));
| ^~~
|
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 -= lowbit(x)) y += c[x];
return y;
}
} tr;
int main() {
scanf("%d%d", &N, &M);
for (int i = 1; i <= N; ++i) {
scanf("%d%d", &a[i].l, &a[i].r);
a[i].len = (a[i].r - a[i].l + 1);
}
sort(a + 1, a + N + 1,
[](node a, node b) -> bool { return a.len < b.len; });
for (int d = 1, p = 1; d <= M; ++d) {
while (p <= N && a[p].len < d) {
tr.insert(a[p].l, 1);
tr.insert(a[p].r + 1, -1);
++p;
}
int ans = N - p + 1;
for (int i = d; i <= M; i += d)
ans += tr.query(i);
printf("%d\n", ans);
}
return 0;
} | 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>>;
const double eps = 1e-10;
const int MOD = 1000000007;
const int INF = 1000000000;
const ll LINF = 1ll<<50;
template<typename T>
void printv(const vector<T>& s) {
for(int i=0;i<(int)(s.size());++i) {
cout << s[i];
if(i == (int)(s.size())-1) cout << endl;
else cout << " ";
}
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(10);
int n, m; cin >> n >> m;
vector<vector<P>> v(m+1);
for(int i=0;i<n;++i) {
int l, r; cin >> l >> r;
v[r-l+1].push_back({l, r});
}
LazySegmentTreeAddSum st(vll(m+1));
ll su = n;
for(int i=1;i<=m;++i) {
for(int j=0;j<SZ(v[i]);++j) {
su--;
st.add(v[i][j].first, v[i][j].second + 1, 1);
}
int pos = 0;
int ans = su;
while(pos <= m) {
ans += st.getsum(pos, pos+1);
//cout << i << ":" << pos << ":" << ans << endl;
pos += i;
}
cout << ans << endl;
}
}
| 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<unordered_map>
#include<utility>
#include<cassert>
using namespace std;
typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;
typedef long double ld;
const int inf=1e9+7;
const ll INF=1LL<<60 ;
const ll mod=1e9+7 ;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<int, int> P;
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(),c.end()
#define pb push_back
#define debug(x) cout << #x << " = " << (x) << endl;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//#define int long long
template<typename T, typename S>
struct LazySegmentTree{
private:
int n;
vector<T> node;
vector<S> lazy;
T E0;
S E1;
inline void updatef(S& lazy,S& value){
lazy += value;
//lazy = max(lazy, value);
//lazy = min(lazy, value);
}
inline void calculatef(T& node,S& lazy,int len){
node += lazy * len; //区間sumはこっち
//node += lazy ; //区間maxとか
}
inline T queryf(T& x,T& y){
return x + y;
//return x * y;
//return max(x, y);
}
public:
LazySegmentTree(int sz,T nodeE,S lazyE ):E0(nodeE), E1(lazyE){
n=1;
while(n<sz)n<<=1;
node.resize(2*n-1,E0);
lazy.resize(2*n-1,E1);
}
LazySegmentTree(vector<T>& v,T E0,S E1 ):E0(E0),E1(E1){
n=1;
int sz=v.size();
while(n<sz)n<<=1;
node.resize(2*n-1,E0);
lazy.resize(2*n-1,E1);
rep(i,sz)node[i+n-1] = v[i];
for(int i=n-2; i>=0; --i){
node[i] = queryf(node[2*i+1],node[2*i+2]);
}
}
void eval(int k,int l,int r){
if(lazy[k]==E1)return ;
calculatef(node[k], lazy[k], r-l);
if(r-l>1){
updatef(lazy[2*k+1], lazy[k]);
updatef(lazy[2*k+2], lazy[k]);
}
lazy[k]=E1;
}
void update(int a, int b, S x,int k=0,int l=0,int r=-1){
if(r<0)r=n;
eval(k,l,r);
if(r<=a||b<=l)return;
if(a<=l&&r<=b){
updatef(lazy[k], x);
eval(k,l,r);
}
else {
update(a,b,x,2*k+1,l,(l+r)/2);
update(a,b,x,2*k+2,(l+r)/2,r);
node[k]=queryf(node[2*k+1], node[2*k+2]);
}
}
T query(int a,int b,int k=0,int l=0,int r=-1){
if(r<0)r=n;
eval(k,l,r);
if(r<=a||b<=l)return E0;
if(a<=l&&r<=b)return node[k];
T xl=query(a,b,2*k+1,l,(l+r)/2);
T xr=query(a,b,2*k+2,(l+r)/2,r);
return queryf(xl, xr);
}
};
using meisan = pair<int, pair<int, int>>;
void solve() {
int n, m; cin >> n >> m;
vector<meisan> ms;
rep(i, n) {
int l, r; cin >> l >> r;
ms.push_back(make_pair(r - l + 1, make_pair(l, r + 1)));
}
sort(all(ms));
LazySegmentTree<int, int> sg(m + 1, 0, 0);
int j = 0;
for(int d = 1; d <= m; ++d) {
while(ms[j].fr.fr < d) {
sg.update(ms[j].sc.fr, ms[j].sc.sc, 1);
++j;
}
int res = n - j;
for(int k = 0; k <= m; k += d) {
if(sg.query(k, k + 1)) res ++;
}
cout << res << endl;
}
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
//cout << fixed << setprecision(10);
//init();
solve();
//cout << "finish" << endl;
return 0;
} | 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 first
| ^~~~~
a.cc:144:24: note: in expansion of macro 'fr'
144 | while(ms[j].fr.fr < d) {
| ^~
|
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;
/***************************/
typedef long long ll;
typedef long long ijt;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef pair<int, int> pi;
typedef vector<pair<int, int>> vpi;
const long long INF = 1LL << 55;
#define itn int
#define endl '\n'
#define pb push_back
#define mp make_pair
#define ss second
#define ff first
#define dup(x,y) ((x) + (y) - 1)/(y)
#define mins(x,y) x = min(x,y)
#define maxs(x,y) x = max(x,y)
#define all(x) (x).begin(),(x).end()
#define Rep(n) for(int i = 0;i < n;i++)
#define rep(i,n) for(int i = 0;i < n;i++)
#define rrep(i,n) for(int i = n - 1;i >= 0;i--)
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() )
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
ll qp(ll a, ll b) { ll ans = 1; do { if (b & 1)ans = 1ll * ans*a; a = 1ll * a*a; } while (b >>= 1); return ans; }
ll qp(ll a, ll b, int mo) { ll ans = 1; do { if (b & 1)ans = 1ll * ans*a%mo; a = 1ll * a*a%mo; } while (b >>= 1); return ans; }
#define _GLIBCXX_DEBUG
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
template<typename T> // T: type of cost
struct BIT {
ijt n;
vector<T> d;
BIT(ijt n = 0) :n(n), d(n + 1) {}
void add(ijt i, T x = 1) {
for (i++; i <= n; i += i & -i) {
d[i] += x;
}
}
T sum(ijt i) {
T x = 0;
for (i++; i; i -= i & -i) {
x += d[i];
}
return x;
}
long long inversion(vector<ijt> a) {
long long ans = 0;
for (ijt j = 0; j < a.size(); j++) {
ans += j - sum(a[j]);
add(a[j], 1);
}
return ans;
}
};
ijt main(void) {
ijt n, m; cin >> n >> m;
vector < pair<ijt, pair<ijt, ijt>>> p(n);
for (ijt i = 0; i < n; i++)
{
ijt a, b; cin >> a >> b;
p[i] = mp(b - a + 1, mp(a, b));
}
sort(all(p));
ijt k = 0;
BIT<ijt> bt(300030);
for (ijt i = 1; i <= m; i++) {
ijt ans = 0;
while (p[k].ff <= i) {
bt.add(p[k].ss.ss + 1, -1);
bt.add(p[k].ss.ff, 1);
k++;
}
ans += n - k;
for (ijt j = 0; j <= m + 1; j += i) {
ans += bt.sum(j);
}
cout << ans << endl;
}
cout << endl;
return 0;
} | 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[1]+...A[i]的和
int sum(int x)
{
int sum = 0;
while(x)
{
sum += c[x];
x -= lowbit(x);
}
return sum;
}
//令A[i] += val
void add(int x, int val)
{
while(x <= n) //注意这里的n,是树状数组维护的长度
{
c[x] += val;
x += lowbit(x);
}
}
struct node
{
int l,r;
}a[MAXN];
bool cmp1(node x,node y)
{
return x.r-x.l<y.r-y.l;
}
bool cmp2(node x,node y)
{
return x.r-x.l<=y.r-y.l;
}
int main()
{
while(scanf("%d%d",&m,&n)!=-1)
{
memset(c,0,sizeof(c));
for(int i=1;i<=m;i++)
{
scanf("%d%d",&a[i].l,&a[i].r);
}
sort(a+1,a+m+1,cmp);
int j=0;
for(int d=1;d<=n;d++)
{
int temp=0;
for(int i=d;i<=n;i+=d)
{
temp+=sum(i);
}
printf("%d\n",temp+m-j) ;
while(j<m&&a[j+1].r-a[j+1].l+1<d)
{
add(a[j+1].l,1);
add(a[j+1].r+1,-1);
j++;
}
}
}
return 0;
}
| 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 novela
// Bela, ingênua, tipo como cinderela
// Sorte é do homem que estiver ao lado dela
// Guerreira, não compare com as demais
// Lutou muito para cumprir a exigência de seus pais
// Sua força vai além do que cê pensa ser capaz
// Essa menina não desiste daquilo que vai atrás, mas
// Eu fui tão cego pra não ver
// Que apenas ao meu lado ela queria viver
// Enquanto que por outra pessoa eu quis correr
// Ela não desistiu de mim mesmo eu a fazendo sofrer
// Que idiota, como eu não pude perceber?
// Que a menina que me amava estava sempre ali pra ver
// Eu sei que esse sentimento eu não mereço ter
// Mas desta vez eu vou tentar com meus erros aprender
//
//
// Sempre amei você
// Mesmo de longe sem te ter
// Você me deu forças para viver
// E ser quem eu queria ser
//
//
// Ela sempre esteve lá, pra me ajudar
// Quando eu caí, me fez levantar
// Lutei tanto por meu sonho que sempre quis alcançar
// Que acabei ficando cego sem poder enxergar
// Eu nem consegui notar
// Que bem na minha frente era quem deveria amar
// Sempre achei que estava certo e que não podia errar
// Mas só mesmo quando perde pra então valorizar
// E eu perdi, e finalmente entendi
// Que quem eu procurava estava sempre ali
// Levou muito tempo pra ficha cair
// Como eu fui tapado, eu tenho que admitir
// Essa menina conseguiu me surpreender
// Seu olhar estava sempre além do que eu podia ver
// Eu tive que a perder, só pra perceber
// Que ao lado dela é onde eu quero viver
//
//
// Sempre amei você
// Mesmo de longe sem te ter
// Você me deu forças para viver
// E ser quem eu queria ser
//
//
// Eu tive que a perder
// Pra que pudesse perceber
// Que ao lado dela
// É onde eu quero viver
// Sim, um dia pode ser o fim
// Pode ser tarde demais e tudo acabar assim
// Mas pra ela eu vou dizer
// Não volto com minha palavra
// Com você quero viver
//
//
// Sempre amei você
// Mesmo de longe sem te ter
// Você me deu forças para viver
// E ser quem eu queria ser
#pragma GCC optimize ("Ofast,unroll-loops")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#define pb push_back
#define ff first
#define ss second
#define tm1 first
#define tm2 second.first
#define tm3 second.second
#define sz(x) ll(x.size())
#define fill(x, v) memset(x, v, sizeof(x))
#define all(v) (v).begin(), (v).end()
#define FER(i,a,b) for(ll i=ll(a); i< ll(b); ++i)
#define IFR(i,a,b) for(ll i=ll(a); i>=ll(b); --i )
#define fastio ios_base::sync_with_stdio(0); cin.tie(0)
#define N 6800015
#define M 21
#define sqr(x) (x)*(x)
#define INF 20000000000000000
#define mod 1000000007
#define bas 31
#define pi acos(-1)
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef pair<ll, ll> ii;
typedef pair<ll, ii > tri;
typedef vector<ll> vi;
typedef vector<ii> vii;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> set_t;
#define trace(...) f(#__VA_ARGS__, __VA_ARGS__)
template<typename t> void f(const char* x, t&& val1){
cout<<x<< " : "<<val1<<endl;
}
template<typename t1, typename... t2> void f(const char* x, t1&& val1, t2&&... val2){
const char* xd=strchr(x+1, ',');
cout.write(x, xd-x)<<" : "<<val1<<" | ";
f(xd+1, val2...);
}
struct ST{
ll n, t[1<<21];
inline ll Op(ll &val1, ll &val2){
return val1+val2;
}
inline void modify(ll l, ll r, ll val){
for(l+=n, r+=n; l<r; l>>=1, r>>=1){
if(l&1) t[l++]+=val;
if(r&1) t[--r]+=val;
}
}
inline void build(){
IFR(i, n-1, 1) t[i]=Op(t[i<<1], t[i<<1|1]);
}
inline ll que(ll p){
ll ans=0;
for(p+=n; p; p>>=1) ans+=t[p];
return ans;
}
}st;
ll l[1<<20], r[1<<20];
vi v[1<<20];
int main(){
fastio;
ll n, m; cin>>n>>m;
FER(i,0,n){
cin>>l[i]>>r[i];
v[r[i]-l[i]+1].pb(i);
}
ll ans=n;
st.n=n+1;
FER(i,0,st.n) st.t[i+st.n]=0;
st.build();
cout<<n<<endl;
FER(i,2,n+1){
ans-=sz(v[i-1]);
for(auto xd: v[i-1]) st.modify(l[xd], r[xd]+1, 1);
for(ll j=i; j<=n; j+=i) ans+=st.que(j);
cout<<ans<<endl;
}
return 0;
} | 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 long int> >::_Vector_impl::~_Vector_impl()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = long long int]': target specific option mismatch
182 | ~allocator() _GLIBCXX_NOTHROW { }
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/usr/include/c++/14/bits/stl_vector.h:132:14: note: called from here
132 | struct _Vector_impl
| ^~~~~~~~~~~~
|
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))
tr[x] += d;
}
inline int query(int x) {
int res = 0;
for(; x; x -= lowbit(x))
res += tr[x];
return res;
}
int main() {
register int i, d;
scanf("%d%d", &N, &M);
for(i = 1; i <= N; ++i)
scanf("%d%d", &A[i].l, &A[i].r), A[i].d = A[i].r - A[i].l + 1;
sort(A + 1, A + N + 1, [&](Node x, Node y) {return x.d < y.d;});
int k = 1;
for(d = 1; d <= M; ++d) {
while(k <= N && A[k].d < d) {
update(A[k].l, 1); update(A[k].r + 1\, -1);
++k;
}
int ans = N - k + 1;
for(i = d; i <= M; i += d)
ans += query(i);
printf("%d\n", ans);
}
return 0;
} | 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 | register int i, d;
| ^
a.cc:32:25: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
32 | register int i, d;
| ^
|
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
#define INF 1000000000000000000
using namespace std;
typedef vector<int> vec;
typedef vector<vec> mat;
typedef pair<int, int> Pii;
template<typename T>
void readvec(vector<T> &a);
void readindex(vector<int> &a);
signed main(){
int N, M; cin >> N >> M;
vec l(N), r(N);
REP(i, N) cin >> l[i] >> r[i];
vector<Pii> p(N);
REP(i, N) p[i] = Pii(r[i] - l[i] + 1, i);
SORT(p);
int d0 = 1;
vec ans(M + 1);
BIT bit(M + 1), bit2(M + 1);
REP(i, N){
int D = p[i].first;
int n = p[i].second;
bit.add(1, 1);
bit.add(D + 1, -1);
FOR(d, d0 + 1, D + 1){
FOR(k, 1, M / d + 1) ans[d] += bit2.sum(d * i);
}
d0 = D;
bit2.add(l[n], 1);
bit2.add(r[n] + 1, -1);
}
FOR(d, d0 + 1, M + 1){
FOR(k, 1, M / d + 1) ans[d] += bit2.sum(d * i);
}
REP(d, M + 1) ans[d] += bit.sum(d);
REP(d, M + 1) cout << ans[d] << endl;
return 0;
}
template<typename T>
void readvec(vector<T> &a){
REP(i, a.size()){
cin >> a[i];
}
}
void readindex(vector<int> &a){
REP(i, a.size()){
cin >> a[i];
a[i]--;
}
} | 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 | FOR(k, 1, M / d + 1) ans[d] += bit2.sum(d * i);
| ^~~~
a.cc:46:9: error: 'bit2' was not declared in this scope
46 | bit2.add(l[n], 1);
| ^~~~
a.cc:50:40: error: 'bit2' was not declared in this scope
50 | FOR(k, 1, M / d + 1) ans[d] += bit2.sum(d * i);
| ^~~~
a.cc:50:53: error: 'i' was not declared in this scope
50 | FOR(k, 1, M / d + 1) ans[d] += bit2.sum(d * i);
| ^
a.cc:53:29: error: 'bit' was not declared in this scope
53 | REP(d, M + 1) ans[d] += bit.sum(d);
| ^~~
|
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>
#include <functional>
#include <utility>
#include <tuple>
#include <cctype>
#include <bitset>
#include <complex>
#include <cmath>
#include <array>
using namespace std;
#define INF 0x3f3f3f3f
#define INFLL 0x3f3f3f3f3f3f3f3fLL
#define MOD 1000000007
#define mp make_pair
#define mt make_tuple
#define pb push_back
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pint;
typedef pair<ll,ll> pll;
typedef tuple<int,int,int> tint;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef vector<pint> vpint;
int dx[8]={0,0,-1,1,1,1,-1,-1};
int dy[8]={-1,1,0,0,1,-1,1,-1};
const int SIZE=300050;
//ここまでテンプレ
vint node;
//↓区間和を求めるSegmentTree
struct SegmentTreeSum {
private:
int n;
vector<int> node;
public:
// 元配列 v をセグメント木で表現する
SegmentTreeSum(vector<int> v) {
// 最下段のノード数は元配列のサイズ以上になる最小の 2 冪 -> これを n とおく
// セグメント木全体で必要なノード数は 2n-1 個である
int sz = v.size();
n = 1; while(n < sz) n *= 2;
node.resize(2*n-1, 0);
// 最下段に値を入れたあとに、下の段から順番に値を入れる
// 値を入れるには、自分の子の 2 値を参照すれば良い
for(int i=0; i<sz; i++) node[i+n-1] = v[i];
for(int i=n-2; i>=0; i--) node[i] = (node[2*i+1] + node[2*i+2]);
}
void update(int x, int val) {
// 最下段のノードにアクセスする
x += (n - 1);
// 最下段のノードを更新したら、あとは親に上って更新していく
node[x] = val;
while(x > 0) {
x = (x - 1) / 2;
node[x] = (node[2*x+1] + node[2*x+2]);
}
}
int getsum(int a, int b, int k=0, int l=0, int r=-1) {
// 最初に呼び出されたときの対象区間は [0, n)
if(r < 0) r = n;
// 要求区間と対象区間が交わらない -> 適当に返す
if(r <= a || b <= l) return 0;
// 要求区間が対象区間を完全に被覆 -> 対象区間を答えの計算に使う
if(a <= l && r <= b) return node[k];
// 要求区間が対象区間の一部を被覆 -> 子について探索を行う
// 左側の子を vl ・ 右側の子を vr としている
// 新しい対象区間は、現在の対象区間を半分に割ったもの
int vl = getsum(a, b, 2*k+1, l, (l+r)/2);
int vr = getsum(a, b, 2*k+2, (l+r)/2, r);
return (vl + vr);
}
};
//↑区間和を求めるSegmentTree
int main(){
int N,M;
cin>>N>>M;
//x=l,y=r
//クエリ<x,0:区間,1:質問,y>
multiset<tint> Q;
//クエリに区間を入れる
for(int i=0;i<N;i++){
int l,r;
cin>>l>>r;
Q.insert(mt(l,0,r));
}
//クエリに質問を入れていく
for(int i=1;i<=M;i++){
for(int j=i;j<=M;j+=i){
int a=j-i,b=j;
//すでに入れてたら入れない
if(Q.find(mt(b,1,b))==Q.end())
Q.insert(mt(b,1,b));
if(Q.find(mt(a,1,b))==Q.end())
Q.insert(mt(a,1,b));
}
}
//セグ木
for(int i=0;i<=M+1;i++)
node.pb(0);
SegmentTreeSum S(node);
//クエリを処理する
unordered_map<pint,int> pam;
for(tint T:Q){
int a,b,c;
tie(a,c,b)=T;
//区間クエリなら、区間を追加する
if(c==0)
S.update(b,S.getsum(b,b+1)+1);
//質問クエリなら、質問に答える
else{
pam[mp(a,b)]=S.getsum(b,M+1);
}
}
//答えを求める
for(int i=1;i<=M;i++){
int ans=0;
for(int j=i;j<=M;j+=i){
int a=j-i,b=j;
ans+=pam[mp(b,b)]-pam[mp(a,b)];
}
cout<<ans<<endl;
}
return 0;
} | 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::pair<int, int>, int> >]'
123 | unordered_map<pint,int> pam;
| ^~~
In file included from /usr/include/c++/14/unordered_map:41,
from a.cc:16:
/usr/include/c++/14/bits/unordered_map.h:148:7: note: '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::pair<int, int>, int> >]' is implicitly deleted because the default definition would be ill-formed:
148 | unordered_map() = default;
| ^~~~~~~~~~~~~
/usr/include/c++/14/bits/unordered_map.h: At global scope:
/usr/include/c++/14/bits/unordered_map.h:148:7: error: use of deleted function 'std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::_Hashtable() [with _Key = std::pair<int, int>; _Value = std::pair<const std::pair<int, int>, int>; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<std::pair<int, int> >; _Hash = std::hash<std::pair<int, int> >; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>]'
In file included from /usr/include/c++/14/bits/unordered_map.h:33:
/usr/include/c++/14/bits/hashtable.h:539:7: note: 'std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::_Hashtable() [with _Key = std::pair<int, int>; _Value = std::pair<const std::pair<int, int>, int>; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<std::pair<int, int> >; _Hash = std::hash<std::pair<int, int> >; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; _RehashPolicy = std::__detail::_Prime_rehash_policy; _Traits = std::__detail::_Hashtable_traits<true, false, true>]' is implicitly deleted because the default definition would be ill-formed:
539 | _Hashtable() = default;
| ^~~~~~~~~~
/usr/include/c++/14/bits/hashtable.h:539:7: error: use of deleted function 'std::__detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _Traits>::_Hashtable_base() [with _Key = std::pair<int, int>; _Value = std::pair<const std::pair<int, int>, int>; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<std::pair<int, int> >; _Hash = std::hash<std::pair<int, int> >; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; _Traits = std::__detail::_Hashtable_traits<true, false, true>]'
In file included from /usr/include/c++/14/bits/hashtable.h:35:
/usr/include/c++/14/bits/hashtable_policy.h:1731:7: note: 'std::__detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _Traits>::_Hashtable_base() [with _Key = std::pair<int, int>; _Value = std::pair<const std::pair<int, int>, int>; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<std::pair<int, int> >; _Hash = std::hash<std::pair<int, int> >; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; _Traits = std::__detail::_Hashtable_traits<true, false, true>]' is implicitly deleted because the default definition would be ill-formed:
1731 | _Hashtable_base() = default;
| ^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/hashtable_policy.h:1731:7: error: use of deleted function 'std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code>::_Hash_code_base() [with _Key = std::pair<int, int>; _Value = std::pair<const std::pair<int, int>, int>; _ExtractKey = std::__detail::_Select1st; _Hash = std::hash<std::pair<int, int> >; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; bool __cache_hash_code = true]'
/usr/include/c++/14/bits/hashtable_policy.h: In instantiation of 'std::__detail::_Hashtable_ebo_helper<_Nm, _Tp, true>::_Hashtable_ebo_helper() [with int _Nm = 1; _Tp = std::hash<std::pair<int, int> >]':
/usr/include/c++/14/bits/hashtable_policy.h:1328:7: required from here
1328 | _Hash_code_base() = default;
| ^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/hashtable_policy.h:1245:49: error: use of deleted function 'std::hash<std::pair<int, int> >::hash()'
1245 | _Hashtable_ebo_helper() noexcept(noexcept(_Tp())) : _Tp() { }
| ^~~~~
In file included from /usr/include/c++/14/string_view:50,
from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:3:
/usr/include/c++/14/bits/functional_hash.h:102:12: note: 'std::hash<std::pair<int, int> >::hash()' is implicitly deleted because the default definition would be ill-formed:
102 | struct hash : __hash_enum<_Tp>
| ^~~~
/usr/include/c++/14/bits/functional_hash.h:102:12: error: no matching function for call to 'std::__hash_enum<std::pair<int, int>, false>::__hash_enum()'
/usr/include/c++/14/bits/functional_hash.h:83:7: note: candidate: 'std::__hash_enum<_Tp, <anonymous> >::__hash_enum(std::__hash_enum<_Tp, <anonymous> >&&) [with _Tp = std::pair<int, int>; bool <anonymous> = false]'
83 | __hash_enum(__hash_enum&&);
| ^~~~~~~~~~~
/usr/include/c++/14/bits/functional_hash.h:83:7: note: candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/functional_hash.h:102:12: error: 'std::__hash_enum<_Tp, <anonymous> >::~__hash_enum() [with _Tp = std::pair<int, int>; bool <anonymous> = false]' is private within this context
102 | struct hash : __hash_enum<_Tp>
| ^~~~
/usr/include/c++/14/bits/functional_hash.h:84:7: note: declared private here
84 | ~__hash_enum();
| ^
/usr/include/c++/14/bits/hashtable_policy.h:1245:49: note: use '-fdiagnostics-all-candidates' to display considered candidates
1245 | _Hashtable_ebo_helper() noexcept(noexcept(_Tp())) : _Tp() { }
| ^~~~~
/usr/include/c++/14/bits/hashtable_policy.h:1328:7: note: 'std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code>::_Hash_code_base() [with _Key = std::pair<int, int>; _Value = std::pair<const std::pair<int, int>, int>; _ExtractKey = std::__detail::_Select1st; _Hash = std::hash<std::pair<int, int> >; _RangeHash = std::__detail::_Mod_range_hashing; _Unused = std::__detail::_Default_ranged_hash; bool __cache_hash_code = true]' is implicitly deleted because the default definition would be ill-formed:
1328 | _Hash_code_base() = default;
| ^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/hashtable_policy.h:1328:7: error: use of deleted function 'std::__detail::_Hashtable_ebo_helper<1, std::hash<std::pair<int, int> >, true>::~_Hashtable_ebo_helper()'
/usr/include/c++/14/bits/hashtable_policy.h:1242:12: note: 'std::__detail::_Hashtable_ebo_helper<1, std::hash<std::pair<int, int> >, true>::~_Hashtable_ebo_helper()' is implicitly deleted because the default definition would be ill-formed:
1242 | struct _Hashtable_ebo_helper<_Nm, _Tp, true>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/hashtable_policy.h:1242:12: error: use of deleted function 'std::hash<std::pair<int, int> >::~hash()'
/usr/include/c++/14/bits/functional_hash.h:102:12: note: 'std::hash<std::pair<int, int> >::~hash()' is implicitly deleted because the default definition would be ill-formed:
102 | struct hash : __hash_enum<_Tp>
| ^~~~
/usr/include/c++/14/bits/functional_hash.h:102:12: error: 'std::__hash_enum<_Tp, <anonymous> >::~__hash_enum() [with _Tp = std::pair<int, int>; bool <anonymous> = false]' is private within this context
/usr/include/c++/14/bits/functional_hash.h:84:7: note: declared private here
84 | ~__hash_enum();
| ^
/usr/include/c++/14/bits/hashtable_policy.h:1731:7: note: use '-fdiagnostics-all-candidates' to display considered candidates
1731 | _Hashtable_base() = default;
| ^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/hashtable_policy.h:1731:7: error: use of deleted function 'std::__detail::_Hash_code_base<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::__detail::_Select1st, std::hash<std::pair<int, int> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, true>::~_Hash_code_base()'
/usr/include/c++/14/bits/hashtable_policy.h:1306:12: note: 'std::__detail::_Hash_code_base<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::__detail::_Select1st, std::hash<std::pair<int, int> >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, true>::~_Hash_code_base()' is implicitly deleted because the default definition would be ill-formed:
1306 | struct _Hash_code_base
| ^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/hashtable_policy.h:1306:12: error: use of deleted function 'std::__detail::_Hashtable_ebo_helper<1, std::hash<std::pair<int, int> >, true>::~_Hashtable_ebo_helper()'
/usr/include/c++/14/bits/hashtable.h:539:7: note: use '-fdiagnostics-all-candidates' to display considered candidates
539 | _Hashtable() = default;
| ^~~~~~~~~~
/usr |
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;}for(int u:A[L])U(u,1),U(u+L,-1),M--;printf("%d\n",B);}}
| ^~~~~
a.cc:2:36: 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;}for(int u:A[L])U(u,1),U(u+L,-1),M--;printf("%d\n",B);}}
| ^~~~~
a.cc:2:99: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
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;}for(int u:A[L])U(u,1),U(u+L,-1),M--;printf("%d\n",B);}}
| ^~~~
a.cc: In function 'int main()':
a.cc:2:106: error: 'scanf' was not declared in this scope
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;}for(int u:A[L])U(u,1),U(u+L,-1),M--;printf("%d\n",B);}}
| ^~~~~
a.cc:2:281: error: 'printf' was not declared in this scope
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;}for(int u:A[L])U(u,1),U(u+L,-1),M--;printf("%d\n",B);}}
| ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
1 | #include<vector>
+++ |+#include <cstdio>
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;}for(int u:A[L])U(u,1),U(u+L,-1),M--;printf("%d\n",B);}}
|
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) {
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: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 of 'main' with no type [-Wreturn-type]
8 | main() {
| ^~~~
a.cc: In function 'int main()':
a.cc:9:8: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | for (gets(&I); ~scanf("%d%d", &L, &R);)
| ^~~~
| getw
|
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 <= 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--;
std::cout << B << "\n";
}
} | 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 conversion before '(' token
8 | main(B, L, R, I) {
| ^
|
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;
for (i = d; i <= n; i += d) {
r = 0;
while (x)
r += S[x], x -= x & -x;
Q(i), a += r;
}
for (int u : A[d])
U(u, 1), U(u + d, -1), m--;
printf("%d\n", a);
}
return 0;
} | 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: error: 'x' was not declared in this scope
16 | while (x)
| ^
a.cc:18:7: error: 'Q' was not declared in this scope
18 | Q(i), a += r;
| ^
|
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 OUT_SIZE 100005
#define ll long long
//fread->read
bool IOerror=0;
inline char nc(){
static char buf[BUF_SIZE],*p1=buf+BUF_SIZE,*pend=buf+BUF_SIZE;
if (p1==pend){
p1=buf; pend=buf+fread(buf,1,BUF_SIZE,stdin);
if (pend==p1){IOerror=1;return -1;}
//{printf("IO error!\n");system("pause");for (;;);exit(0);}
}
return *p1++;
}
inline bool blank(char ch){return ch==' '||ch=='\n'||ch=='\r'||ch=='\t';}
inline void read(int &x){
bool sign=0; char ch=nc(); x=0;
for (;blank(ch);ch=nc());
if (IOerror)return;
if (ch=='-')sign=1,ch=nc();
for (;ch>='0'&&ch<='9';ch=nc())x=x*10+ch-'0';
if (sign)x=-x;
}
inline void read(ll &x){
bool sign=0; char ch=nc(); x=0;
for (;blank(ch);ch=nc());
if (IOerror)return;
if (ch=='-')sign=1,ch=nc();
for (;ch>='0'&&ch<='9';ch=nc())x=x*10+ch-'0';
if (sign)x=-x;
}
inline void read(double &x){
bool sign=0; char ch=nc(); x=0;
for (;blank(ch);ch=nc());
if (IOerror)return;
if (ch=='-')sign=1,ch=nc();
for (;ch>='0'&&ch<='9';ch=nc())x=x*10+ch-'0';
if (ch=='.'){
double tmp=1; ch=nc();
for (;ch>='0'&&ch<='9';ch=nc())tmp/=10.0,x+=tmp*(ch-'0');
}
if (sign)x=-x;
}
inline void read(char *s){
char ch=nc();
for (;blank(ch);ch=nc());
if (IOerror)return;
for (;!blank(ch)&&!IOerror;ch=nc())*s++=ch;
*s=0;
}
inline void read(char &c){
for (c=nc();blank(c);c=nc());
if (IOerror){c=-1;return;}
}
//getchar->read
inline void read1(int &x){
char ch;int bo=0;x=0;
for (ch=getchar();ch<'0'||ch>'9';ch=getchar())if (ch=='-')bo=1;
for (;ch>='0'&&ch<='9';x=x*10+ch-'0',ch=getchar());
if (bo)x=-x;
}
inline void read1(ll &x){
char ch;int bo=0;x=0;
for (ch=getchar();ch<'0'||ch>'9';ch=getchar())if (ch=='-')bo=1;
for (;ch>='0'&&ch<='9';x=x*10+ch-'0',ch=getchar());
if (bo)x=-x;
}
inline void read1(double &x){
char ch;int bo=0;x=0;
for (ch=getchar();ch<'0'||ch>'9';ch=getchar())if (ch=='-')bo=1;
for (;ch>='0'&&ch<='9';x=x*10+ch-'0',ch=getchar());
if (ch=='.'){
double tmp=1;
for (ch=getchar();ch>='0'&&ch<='9';tmp/=10.0,x+=tmp*(ch-'0'),ch=getchar());
}
if (bo)x=-x;
}
inline void read1(char *s){
char ch=getchar();
for (;blank(ch);ch=getchar());
for (;!blank(ch);ch=getchar())*s++=ch;
*s=0;
}
inline void read1(char &c){for (c=getchar();blank(c);c=getchar());}
//scanf->read
inline void read2(int &x){scanf("%d",&x);}
inline void read2(ll &x){
#ifdef _WIN32
scanf("%I64d",&x);
#else
#ifdef __linux
scanf("%lld",&x);
#else
puts("error:can¡®t recognize the system!");
#endif
#endif
}
inline void read2(double &x){scanf("%lf",&x);}
inline void read2(char *s){scanf("%s",s);}
inline void read2(char &c){scanf(" %c",&c);}
inline void readln2(char *s){gets(s);}
//fwrite->write
struct Ostream_fwrite{
char *buf,*p1,*pend;
Ostream_fwrite(){buf=new char[BUF_SIZE];p1=buf;pend=buf+BUF_SIZE;}
void out(char ch){
if (p1==pend){
fwrite(buf,1,BUF_SIZE,stdout);p1=buf;
}
*p1++=ch;
}
void print(int x){
static char s[15],*s1;s1=s;
if (!x)*s1++='0';if (x<0)out('-'),x=-x;
while(x)*s1++=x%10+'0',x/=10;
while(s1--!=s)out(*s1);
}
void println(int x){
static char s[15],*s1;s1=s;
if (!x)*s1++='0';if (x<0)out('-'),x=-x;
while(x)*s1++=x%10+'0',x/=10;
while(s1--!=s)out(*s1); out('\n');
}
void print(ll x){
static char s[25],*s1;s1=s;
if (!x)*s1++='0';if (x<0)out('-'),x=-x;
while(x)*s1++=x%10+'0',x/=10;
while(s1--!=s)out(*s1);
}
void println(ll x){
static char s[25],*s1;s1=s;
if (!x)*s1++='0';if (x<0)out('-'),x=-x;
while(x)*s1++=x%10+'0',x/=10;
while(s1--!=s)out(*s1); out('\n');
}
void print(double x,int y){
static ll mul[]={1,10,100,1000,10000,100000,1000000,10000000,100000000,
1000000000,10000000000LL,100000000000LL,1000000000000LL,10000000000000LL,
100000000000000LL,1000000000000000LL,10000000000000000LL,100000000000000000LL};
if (x<-1e-12)out('-'),x=-x;x*=mul[y];
ll x1=(ll)floor(x); if (x-floor(x)>=0.5)++x1;
ll x2=x1/mul[y],x3=x1-x2*mul[y]; print(x2);
if (y>0){out('.'); for (size_t i=1;i<y&&x3*mul[i]<mul[y];out('0'),++i); print(x3);}
}
void println(double x,int y){print(x,y);out('\n');}
void print(char *s){while (*s)out(*s++);}
void println(char *s){while (*s)out(*s++);out('\n');}
void flush(){if (p1!=buf){fwrite(buf,1,p1-buf,stdout);p1=buf;}}
~Ostream_fwrite(){flush();}
}Ostream;
inline void print(int x){Ostream.print(x);}
inline void println(int x){Ostream.println(x);}
inline void print(char x){Ostream.out(x);}
inline void println(char x){Ostream.out(x);Ostream.out('\n');}
inline void print(ll x){Ostream.print(x);}
inline void println(ll x){Ostream.println(x);}
inline void print(double x,int y){Ostream.print(x,y);}
inline void println(double x,int y){Ostream.println(x,y);}
inline void print(char *s){Ostream.print(s);}
inline void println(char *s){Ostream.println(s);}
inline void println(){Ostream.out('\n');}
inline void flush(){Ostream.flush();}
//puts->write
char Out[OUT_SIZE],*o=Out;
inline void print1(int x){
static char buf[15];
char *p1=buf;if (!x)*p1++='0';if (x<0)*o++='-',x=-x;
while(x)*p1++=x%10+'0',x/=10;
while(p1--!=buf)*o++=*p1;
}
inline void println1(int x){print1(x);*o++='\n';}
inline void print1(ll x){
static char buf[25];
char *p1=buf;if (!x)*p1++='0';if (x<0)*o++='-',x=-x;
while(x)*p1++=x%10+'0',x/=10;
while(p1--!=buf)*o++=*p1;
}
inline void println1(ll x){print1(x);*o++='\n';}
inline void print1(char c){*o++=c;}
inline void println1(char c){*o++=c;*o++='\n';}
inline void print1(char *s){while (*s)*o++=*s++;}
inline void println1(char *s){print1(s);*o++='\n';}
inline void println1(){*o++='\n';}
inline void flush1(){if (o!=Out){if (*(o-1)=='\n')*--o=0;puts(Out);}}
struct puts_write{
~puts_write(){flush1();}
}_puts;
inline void print2(int x){printf("%d",x);}
inline void println2(int x){printf("%d\n",x);}
inline void print2(char x){printf("%c",x);}
inline void println2(char x){printf("%c\n",x);}
inline void print2(ll x){
#ifdef _WIN32
printf("%I64d",x);
#else
#ifdef __linux
printf("%lld",x);
#else
puts("error:can¡®t recognize the system!");
#endif
#endif
}
inline void println2(ll x){print2(x);printf("\n");}
inline void println2(){printf("\n");}
#undef ll
#undef OUT_SIZE
#undef BUF_SIZE
};
using namespace fastIO;
int n,d[N],m;
int main()
{
read(n); read(m);
for(int i=1;i<=n;i++)
{
int l,r;read(l), read(r);
d[1]++; d[r-l+1]--;
for(int j=r-l+1;j<=r;j++)
{
int jj=(r/(r/j));
int lb=l/(r/j)+bool(l%(r/j));
if(lb>jj) continue;
d[jj+1]--; d[max(lb,j)]++;
j=jj;
}
}
for(register int i=1;i<=m;i++) d[i]+=d[i-1];
for(register int i=1;i<=m;i++) printf("%d\n",d[i]);
return 0 ;
} | 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: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
240 | for(register int i=1;i<=m;i++) d[i]+=d[i-1];
| ^
a.cc:241:26: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
241 | for(register int i=1;i<=m;i++) printf("%d\n",d[i]);
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.