Sponsors

Tag: C language

Codeforces Round #385 (Div....

#include <limits.h> #include <stdio.h> #define N 1000 void query(int *ww, int *aa, int...

Codeforces Round #384 (Div....

#include <stdio.h> #include <string.h> #define MAX(X,Y) ((X)>(Y) ? (X) : (Y)) #define...

Codeforces Round #384 (Div....

#include<stdio.h> int main(){ long x; scanf("%ld",&x); if(x==1) printf("-1"); else printf("%ld %ld %ld",x,x+1,x*(x+1)); return 0; }

Codeforces Round #384 (Div....

long long k; main() { scanf("%d%lld",&k,&k); printf("%dn",1+__builtin_ctzll(k)); }

Codeforces Round #384 (Div....

#include<stdio.h> int main() { int i,j,n,a,b; char s; scanf("%d%d%d",&n,&a,&b); scanf("%s",s); if(s==s) { printf("0"); } else printf("1"); return 0; }

Codeforces Round #383 (Div....

#include <bits/stdc++.h> using namespace std; #define fo(i,a,b) for(int i=(a);i<(b);i++) #define MOD 1000000007 #define...

Codeforces Round #383 (Div....

#include<stdio.h> int n, m, maxW, p, w, b, prev, next,...

odeforces Round #383 (Div....

#include<stdio.h> int n, c, v; int gcd(long long a, long long...

Codeforces Round #383 (Div....

#include<stdio.h> int v; int main(){ int i,l,n,x; long long int r; scanf("%d%d",&n,&x); for(i=0;i<n;i++) { scanf("%d",&l); r=r+v; v++; } printf("%I64d",r); return 0; }

Codeforces Round #382 (Div....

#include<iostream> #include<cstdio> #include<algorithm> #define N 3010 using namespace std; int n,m,f; struct ma{int x,y;}a; bool operator<(ma...

Codeforces Round #382 (Div....

#include <bits/stdc++.h> using namespace std; const int N=2e3+1; int n,m,x,y; bitset<N*2> a; int...

Codeforces Round #382 (Div....

#include<stdio.h> int isprime(int n); int main(){ int n; scanf("%d",&n); if(n%2==1){ if(isprime(n)){ printf("1"); }else{ printf("%d",3-isprime(n-2)); } }else{ printf("%d",1+(n>2)); } return 0; } int isprime(int n){ int i,j; for(i=2;i*i<=n;i++){ if(n%i==0){ return...

Advertisement

spot_img