Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include <stdio.h>
#include <stdlib.h>
int main(void){
int N, X, Y;
int diff, min_diff;
int diffs[2000] = {0};
int i, j;
scanf("%d%d%d", &N, &X, &Y);
for(i = 1; i <= N-1; i++){
for(j = i+1; j <= N; j++){
min_diff = j - i;
diff = abs(X-i) + abs(Y-j) + 1;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_325476/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_325476/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
int main(void) {
long long int n, x, y;
scanf("%lld %lld %lld", &n, &x, &y);
x--;
y--;
long long int center_xy = (x + y) / 2;
long long int dis[n];
for (long long int i = 0; i < n; i++) {
dis[i] = 0;
}
for (long long i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_325519/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_325519/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int p[3],j[2];
int i,n;
int min=5000;
for(i=0;i<3;i++){
scanf("%d",&p[i]);
}
for(i=0;i<2;i++){
scanf("%d",&j[i]);
}
for(i=0;i<3;i++){
for(n=0;n<2;n++){
if(min>p[i]+j[n]) min=p[i]+j[n];
else ;
}
}
printf("%d\n",min-50);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_325562/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_325562/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
int p, min_p = 2000;
int j, min_j = 2000;
int i;
for (i = 0; i < 3; i++){
scanf("%d", &p);
if (min_p > p){
min_p = p;
}
}
for (i = 0; i < 2; i++){
scanf("%d", &j);
if (min_j > j){
min_j = ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_325605/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_325605/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int a[5]={0},b=0,i=0;
for(i=0;i<5;i++){
scanf("%d",&a[i]);
}
if(a[0]>a[1]){
b=a[0];
a[0]=a[1];
a[1]=b;
}
if(a[1]>a[2]){
b=a[1];
a[1]=a[2];
a[2]=b;
}
if(a[0]>a[1]){
b=a[0];
a[0]=a[... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_325670/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_325670/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
int p[3],j[2],ans,minp,minj,i;
scanf("%d", &p[0]);
minp=p[0];
for(i=1;i<3;i++){
scanf("%d", &p[i]);
if(p[i]<minp) minp=p[i];
}
scanf("%d", &j[0]);
minj=j[0];
scanf("%d", &j[1]);
if(j[1]<minj) minj=j[1];
printf("%d\n", minp+minj-50);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_325728/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_325728/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int n,a,b,enter,b_cnt;
char s[100000];
enter = 0;
b_cnt = 1;
scanf("%d %d %d",&n,&a,&b);
scanf("%s",s);
for(int i = 0 ; i < n ; i++ )
if(s[i]=='a' && a + b > enter ){
printf("Yes\n");
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_325779/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_325779/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main()
{
int n, a, b, i;
scanf("%d %d %d", &n, &a, &b);
char *s = (char*)malloc(n * sizeof(char));
scanf("%s", s);
int aco = 0, bco = 0;
for (i = 0; i < n; i++) {
if (s[i] == 'a') {
if (aco+bco < a+b) {
printf("Yes\n");
aco++;
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_325821/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_325821/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
// Aizu 1105: Unable Count
// 2017.9.12 bal4u@uu
#include <stdio.h>
#include <string.h>
#define min(a,b) ((a)<=(b)?(a):(b))
char f[2000003];
int main()
{
int n, a, b, k, s;
while (scanf("%d%d%d", &n, &a, &b) && n) {
memset(f, 0, n+1); f[0] = f[a] = f[b] = 1, s = min(a, b);
for (k = s; k <= n; k++) if (f[k]) f... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_325865/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_325865/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
int i,k,n,s[100],q,t[100],cnt = 0;
scanf("%d",&n);
for(i = 0; i < n; i ++)scanf("%d",&s[i]);
scanf("%d",&q);
for(i = 0; i < q; i ++)scanf("%d",&t[i]);
for(i = 0; i < n; i ++){
for(k = 0; k < q; k ++){
if(t[i] == s[k]){
cnt ++;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_325915/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_325915/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#define N 100
#define Q 100
int main(void){
int S[N];
int T[Q];
int a,C=0,i,j,n,q;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf ("%d",&S[i]);
}
scanf("%d",&q);
for(i=0;i<q;i++){
scanf ("%d",&T[i]);
}
for(j=0;j<q;j++){
for(i=0;i<n;i++){
if(S[i]==T[j]) {
C+=1; ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_325959/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_325959/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int i,k,n,q,cnt=0,S[100]={},T[100]={},comp[500]={};
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&S[i]);
}
scanf("%d",&q);
for(i=0;i<q;i++){
scanf("%d",&T[i]);
}
for(i=0;i<n;i++){
for(k=0;k<q;k++){
if(S[i]==T[k]&&comp[k]==0){
cnt++;
comp[k]++;
break;
}
}
}
printf("%d\n",cnt);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326000/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326000/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
int n1,n2;
int i,j;
int count=0;
scanf("%d",&n1);
int q1[n1];
for(i=0;i<n1;i++){
scanf("%d",&q1[i]);
}
scanf("%d",&n2);
int q2[n2];
for(i=0;i<n2;i++){
scanf("%d",&q2[i]);
}
for(i=0;i<n2;i++){
for(j=0;j<n1;j++){
if(q2[i]==q1[j]){
cou... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326044/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326044/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
int cnt=0, buf, i, n, setA[101]={0}, setB[101]={0};
scanf("%d", &n);
getchar();
for(i=0; i<n; i++){
scanf("%d", &buf);
getchar();
setA[buf] = 1;
}
scanf("%d", &n);
getchar();
for(i=0; i<n; i++){
scanf("%d", &buf);
getchar();
setB[buf] = 1;
}
for(i=1; i<=100... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326088/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326088/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(){
int n, i, q, j;
int S [1000] = {0};
int T [1000] = {0};
int counter = 0;
scanf("%d",&n);
for (i = 0; i < n; i++) {
scanf("%d",&S[i]);
}
scanf("%d",&q);
for (i = 0; i < q; i++) {
scanf("%d",&T[i]);
}
for (j = 0; j < q; j++) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326138/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326138/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void) {
double w,l;
int n;
while(scanf("%d,%lf,%lf",&n,&w,&l) != EOF){
if((w / (l * l)) >= 25.0f){
printf("%d\n",n);
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326196/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326196/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#define EPS 1e-10
int main(void){
int num;
double w,h;
double bmi;
while(scanf("%d,%lf,%lf ",&num,&w,&h)!=EOF){
bmi = w/(h*h);
if(25.0 - bmi < EPS)printf("%d\n",num);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326246/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326246/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int main(void)
{
int num;
double weight,hight;
while(scanf("%d,%lf,%lf",&num, &weight,&hight) != EOF){
if(25<=(weight/(hight*hight))){
printf("%d\n", num);
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326310/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326310/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
long int a,b;
scanf("%ld %ld",&a,&b);
if(a>b) printf("%ld",a-b);
else printf("0");
return 0;} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326369/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326369/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int a,b;
scanf("%d%d",&a,&b);
if(a>b)//还有沙子是会倒完的(不然要a干什么)
printf("%d\n",a-b);//回车了解一下?
else
printf("0\n");//是0,不是空,em··· 大佬的是错的。。。
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326411/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326411/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
int main(void){
int A,B,C,D,E,x,y,cou=0,v[3];
char S[3],s[3],X,Y;
scanf("%d %d",&A,&B);
if(A<B){
printf("0");
}else{
printf("%d",A-B);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326455/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326455/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int x,t,sand;
scanf("%d %d",&x,&t);
if(x>t){
sand=x-t;
}
else{
sand=0;
}
printf("%d",sand);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326499/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326499/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int a,b,c;
scanf("%d %d",&a,&b);
c=a-b;
if(c>0)
printf("%d",c);
else
printf("0");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326541/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326541/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int x,t;
scanf("%d %d",&x,&t);
if(x-t>0){
printf("%d",x-t);}
else{printf("0");}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326585/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326585/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <math.h>
#define P 1000000007
int comp(const void *a, const void *b){return *(int*)a-*(int*)b;}
int main(void){
int n, i, j;
int p[8];
char u[8];
scanf("%d", &n);
int k[8];
k[0]=0; k... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326693/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326693/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
#include <stdlib.h>
int fact(int n){
if(n == 0){
return 1;
}else{
int ans=1;
for(int i = 1 ; i <= n ;i++){
ans *= i;
}
return ans;
}
}
int main(){
int N;
int P[8],Q[8];
int a = 0;
int b = 0;
scanf("%... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326736/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326736/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
// AOJ 1212: Mirror Illusion
// 2018.1.23 bal4u@uu
#include <stdio.h>
#include <string.h>
char mir[9][9][9][9];
int mv[4][2] = {{50,50},{-50,50},{-50,-50},{50,-50}};
int tr[2][4] = {{3,2,1,0},{1,0,3,2}};
int main()
{
int n, i, v, x, y, d, wall;
char s[5];
while (scanf("%d", &n) && n >= 0) {
memset(mir, 0, size... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326866/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326866/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@mv = dso_local local_unnam... |
#include<stdio.h>
int main()
{
int A,B,C,D;
scanf("%d %d %d",&A,&B,&C);
D=A+B;
if(D>C)
{
printf("Yes");
}
else if(D==C)
{
printf("Yes");
}
else
{
printf("No");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326909/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326909/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if(a+b<c){
printf("No\n");
}else{
printf("Yes\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326952/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326952/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
if(a+b>=c){
printf("Yes\n");
}else{
printf("No\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326996/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326996/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
int a , b , c ;
scanf("%d%d%d",&a,&b,&c);
if(c>a+b)printf("No\n");
else if(c<=a+b)printf("Yes\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327038/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327038/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
if(a+b>=c)
{
printf("Yes");
}
else
{
printf("No");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327081/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327081/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
// AOJ 0146: Lupin The 4th
// 2017.9.28 bal4u@uu
// 2017.11.21
#include <stdio.h>
#include <string.h>
#define INF 1e10
#define ABS(a) ((a)>=0?(a):-(a))
#define MAX 32768
int s[17], d[17], v[17]; // ????????±?????????????????¢???????????±?????°
double dp[16][MAX]; // DP????????¨?????????
int w[16][MAX]; // ?????... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327131/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327131/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#define MAX 101
int A[MAX][MAX], s[MAX], h[MAX];
void serch(int x, int y){
int i;
h[x] = y;
for(i=1; i<=s[x]; i++){
if(h[A[x][i]] > y)
serch(A[x][i], y+1);
}
}
int main(){
int i, j, k, n;
scanf("%d", &n);
for(i=1; i<=n; i++){
h[i] = 10000;
for(j=1; j<=n; j++)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327175/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327175/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@h = dso_local local_unname... |
#include <stdio.h>
#include <stdlib.h>
#define WHITE 0
#define GRAY 1
#define BLACK 2
int n,time,head,tail;
int *queue;
int *dist;
int *color;
int **matrix;
void enqueue(int);
int dequeue(void);
void bfs(void);
int main(){
int i,j,u,k,v;
scanf("%d",&n);
queue = malloc(n * sizeof(int));
color = malloc(n * ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327232/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327232/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#define INF -1
typedef struct{
int d;
int f;
}timestamp;
typedef struct{
int u;
int k;
int *v;
}graph;
graph g[110];
timestamp t[110];
int mytime = 0;
int q[110];
void bfs(void);
int main(void){
int i,j,n;
scanf("%d", &n);
for(i = 0; i <= n; i++){
q[i]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327276/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327276/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.timestamp = type { ... |
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#define WHITE 0
#define GRAY 1
#define BLACK 2
void bfs(int);
int n, A[101][101], color[101], d[101], Q[101];
int main(){
int u, k, v, i, j;
scanf("%d", &n);
for(i = 1; i <= n; i++){
color[i] = WHITE;
d[i] = -1;
Q[i] = -1;
for(j = ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327326/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327326/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#define N 100
#define INF 100000000
int n, M[N][N];
int d[N];
int Q[N];
int head, tail;
void enqueue(int x){
Q[tail] = x;
if(tail+1 == N){
tail = 0;
} else {
tail++;
}
}
int dequeue(){
int x;
x = Q[head];
if(head+1 == N){
head = 0;
} else {
head++;
}
return ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327377/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327377/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@Q = dso_local local_unname... |
#include <stdio.h>
#define BLACK 0
#define GRAY 1
#define WHITE 2
#define N_MAX 101
#define INF 9999999
int A[N_MAX][N_MAX];
int color[N_MAX], d[N_MAX];
int Queue[1000];
int start, end;
int n;
void BFS(int);
void init();
int main() {
int i, j, k, num, to;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327434/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327434/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
//problem 11.b
#include <stdio.h>
#define M 10000
#define N 100
#define WHITE 1
#define GRAY 0
#define BLACK -2
#define INF -1
void enq( int );
int deq( void );
void bfs( int );
int n, Q[M], adj[N+10][N+10], color[N+10], d[N+10], tail = 0, head = 0;//Q is queue, p is where queue is, and d is distance from 0 vertex ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327478/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327478/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@tail = dso_local local_unn... |
#include <stdio.h>
#include <stdlib.h>
#define LENGTH 105
void bfs(int, int);
void enqueue(int); /* use queue*/
int dequeue(void);
int array[100][100],dis[100],queue[LENGTH],head=0,tail=0;
int main(){
int num,i,j,id,nextnum,next;
scanf("%d",&num);
for(i=0;i<num;i++){
for(j=0;j<num;j++){
array[i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327520/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327520/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@head = dso_local local_unn... |
#include <stdio.h>
#define N 101
#define BLACK 2
#define GRAY 1
#define WHITE 0
#define NIL -1
int head,tail;
int Q[N];
int color[N];
int discover[N];
int adj[N][N];
int n;
void enqueue(int );
int dequeue();
void bfs(int );
int main(){
//int n;
int u,k,v;
int i,j;
int num;
int uid;
scanf("%d",&n);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327571/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327571/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#define N 100
int n,A[N][N],cp[N];
void Breadth(int pl,int res)
{
int i;
res++;
cp[pl]=res;
for(i=0; i<n; i++){
if(A[pl][i]==1){
if(cp[i]<=res && cp[i]>=0)continue;
Breadth(i,re... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327621/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327621/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@cp = dso_local local_unnam... |
#include <stdio.h>
#define NIL -1
#define MAX 100
int s[MAX], h[MAX], r[MAX][MAX];
void G(int c, int v);
int main(){
int i, j, n, c;
scanf("%d", &n);
for(i = 1; i <= n; i++){
h[i] = 10000;
for(j = 1; j <= n; j++){
r[i][j] = 0;
}
}
for (i = 1; i <= n; i++){
scanf("%d", &c);
scanf("%d... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327672/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327672/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#define HASH 100003
int hash_string(char* s)
{
int i, x = 0;
for (i = 0; s[i] != 0; i++) x = ((x << 5) + s[i] - 'a') % HASH;
return x;
}
int lex_smaller(char* s1, char* s2)
{
int i;
for (i = 0; s1[i] != 0 && s2[i] != 0; i++) {
if (s1[i] < s2[i]) return 1;
else if (s1[i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327751/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327751/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.data = type { i64, ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define ll long long
#define ull unsigned long long
int hantei(int x){
int i,max=sqrt(x);
for (i=2; i<=max; i++) {
if (x%i==0) return 1;
}
return 0;
}
int main(){
int x;
scanf("%d",&x);
while (hantei(x)) x... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327795/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327795/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
long ft_sqrt(long nb)
{
long i;
long count;
i = 1;
count = 0;
while (i <= nb)
{
if (i % 2)
{
nb -= i;
count++;
}
i++;
}
return(count);
}
long is_prime(long nb)
{
long i;
i = 2;
if (nb < 2)
return (0);
while (i <= ft_sqrt(nb))
{
if (nb % i == 0)
return (0);
i+... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327838/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327838/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
int hantei(long x);
int main(){
long X,n;
scanf("%ld",&X);
n=X;
while(hantei(n) == 0){
n++;
}
printf("%ld",n);
return 0;
}
int hantei(long x){
long i,y;
y=sqrt(x);
if(x==2||x==3)
return 1;
if(x%2==0)
return 0;
for(i=3;i<y;i+=2){
i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327881/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327881/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define N 1000
int main(void) {
int a=0,ans=0,flag=0;
// float p=0,q=0;
// char str1[N],str2[N];
scanf("%d", &a);
int i=0;
ans = a;
if(a!=2){
while(1){
for(i=2;i<ans;i++){
if(ans%i==0){
break;
}
if(ans==i+1){
flag=1;
}
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327924/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327924/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
int X,j,divisor,ans_found = 0;
long int i;
scanf("%d",&X);
i = X;
while(ans_found == 0){
divisor = 0;
for(j = 1;j <= i;j++){
if(i%j == 0){
divisor++;
}
}
if(divisor == 2){
printf... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327968/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327968/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
// AOJ 1251: Pathological Paths
// 2017.10.19 bal4u@uu
#include <stdio.h>
#include <string.h>
#define HASHSIZ 10007
typedef struct { char *s; int k; } HASH;
HASH hash[HASHSIZ+2], *hashend = hash + HASHSIZ; // Hash table
void insert(char *s, int w, int k)
{
int i = (101 * *s + 103 * *(s+w-1) + 107 * w) % HASHSIZ;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328031/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328031/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.HASH = type { ptr, ... |
#include <stdio.h>
int main() {
int n, i;
scanf("%d",&n);
printf("I hate ");
for (i=1; i<n; i++) {
if (i%2 == 0)
printf("that I hate ");
else
printf("that I love ");
}
printf("it\n");
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_32809/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_32809/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
#include <stdlib.h>
typedef struct hoge{
long hB;
long hC;
}Hoge;
int asc(const void *a, const void *b) {
long *A = (long *)a;
long *B = (long *)b;
if (*A > *B) return 1;
if (*A < *B) return -1;
return 0;
}
int asc_h(const void *a, const void *b) {
Hoge *A = ( Hoge *)a;
Hoge ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328132/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328132/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.hoge = type { i64, ... |
/*
exit
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#define BIG 2000000007
#define MOD 1000000007
typedef unsigned long long ull;
typedef signed long long sll;
#define N_MAX 100000
#define M_MAX 10000
typedef struct {
int a;
int b;
} hw;
typedef struc... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328183/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328183/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.hw = type { i32, i3... |
#include<stdio.h>
int main(void){
int a,b;
scanf("%d %d",&a,&b);
if(a>=13){
printf("%d\n",b);
}else if(a<=5){
printf("0\n");
}else{
printf("%d\n",b/2);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328240/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328240/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(int argc, char const *argv[])
{
int a = 0, b = 0;
scanf("%d %d", &a, &b);
if (a < 6) {
printf("0\n");
} else if (a >= 6 && a <= 12) {
printf("%d\n", b/2);
} else {
printf("%d\n", b);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328284/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328284/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int a, b;
scanf("%d %d", &a, &b);
if(a >= 13){
printf("%d", b);
}else if(a>=6 && a<=12){
printf("%d", b/2);
}else{
printf("%d", 0);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328327/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328327/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(){
int A,B;
int pay;
scanf("%d %d",&A,&B);
if(A>=13){
pay=B;
}else if(A<=5){
pay=0;
}else{
pay=B/2;
}
printf("%d",(int)pay);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328378/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328378/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int A, B,charge;
printf(" ");
scanf("%d", &A);
printf(" ");
scanf("%d", &B);
if(A <= 100 && A >= 0 && B <= 1000 && B >= 1 && B%2 == 0){
if(A >= 13){charge = B;}
if(A <= 12 && A >= 6){charge = B/2;}
if(A <= 5){charge = 0;}
printf("%d\n", charge);
}
return 0;
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328420/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328420/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str.1 = private unnamed_a... |
#include<stdio.h>
int main(void){
int A,B;
scanf("%d %d",&A,&B);
if(A<=5){
B=0;
}
else if(A<=12){
B/=2;
}
printf("%d\n",B);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328464/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328464/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int a,b;
while(scanf("%d%d",&a,&b)==2)
{
if(a>=13)
{
printf("%d\n",b);
}
else if(a>=6 && a<=12)
{
printf("%d\n",b/2);
}
else if(a>=0 && a<=5)
{
printf("%d\n",0);
}
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328507/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328507/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
signed main(){
int a,b,c;
c = 0;
scanf("%d %d",&a,&b);
if(0<=a-13){
printf("%d\n",b);
}
else{
if(0<=a-6){
printf("%d\n",b/2);
}
else
printf("%d\n",c);
}
return (0);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328550/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328550/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
int a;
long long int b, cost;
scanf("%d %lld", &a, &b);
if(a >= 13)
cost = b;
else if(a >= 6 && a <= 12)
cost = b / 2;
else
cost = 0;
printf("%d\n", cost);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328594/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328594/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
int year;
int price;
scanf("%d %d",&year,&price);
if(year>12) printf("%d\n",price);
if(year>=6 && year<=12) printf("%d\n",price/2);
if(year<=5) printf("0\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328637/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328637/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
//関数宣言
//int func(int x, int y);
int main(void){
//スカラー入力
int M,N;
scanf("%d %d", &M, &N);
if(M>=13){
printf("%d\n",N);
}else if(M<=5){
printf("0\n");
}else{
printf("%d\n",N/2);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328680/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328680/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
// AOJ 3002: Factorization
// 2017.11.29 bal4u@uu
#include <stdio.h>
int a[6], n;
int ans[6];
char buf[100], *p;
int getint()
{
int n = 1;
int minus = 0;
if (*p == '-') p++, minus = 1;
else if (*p == '+') p++;
if (*p >= '0' && *p <= '9') {
n = 0;
while (*p >= '0' && *p <= '9') n = (n<<3) + (n<<1) + (*p++ &... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328730/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328730/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@p = dso_local local_unname... |
// ABC 155-C
// 2020.2.16 bal4u
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
typedef long long ll;
#define gc() getchar_unlocked()
#define pc(c) putchar_unlocked(c)
int in() { // 非負整数の入力
int n = 0; int c;
do c = gc();
while (isspace(c));
do n = 10 * n + (c & 0xf); while ((c = ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328802/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328802/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct._IO_FILE = type { i... |
#include <stdio.h>
int main(void){
// Your code here!
int n;
int w[9<<14]={};
int s[100000]={};
scanf("%d",&n);
int k;
for(int i=0;i<n;i++){
scanf("%d",&k);
w[k]++;
}
int max=0;
for(int i=0;i<1e5;i++... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328853/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328853/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
/*2019/09/13 */
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#define MOD 1000000007
#define MIN 999999999
#define MAX -999999999
typedef long long int ll;
typedef unsigned long long int ull;
void llswap(ll *x,ll *y){ll tmp;tmp=*x;*x=*y;*y=tmp;}
void swap(int *x,int *y){int tmp;tmp=*x;*x=*y;*... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328897/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328897/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int main(void) {
char search[16],ring[32];
int n,i,j,k,c=0,y,l;
scanf("%s",search);
l = strlen(search);
scanf("%d",&n);
for(i = 1;i <= n;i++){
scanf("%s",ring);
for(j = 0;j <= 9;j++){
ring[10+j] = ring[j];
}
for(j = 0;j <= 9;j++){
y = 0;
for(k = 0;k < l;k++... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328990/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328990/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include<string.h>
int main(void)
{
int c,b,r=0;
char d[10];
char a[100];
scanf("%s %d",&d,&b);
for(c=0;c<b;c++){
scanf("%s",a);
strncat(a,a,10);
if((strstr(a,d))!=NULL){
r++;
}
}
printf("%d\n",r);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329076/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329076/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(){
int a, b, c, e = 0, t = 0, d = 0, tmp;
while (scanf("%d%d%d", &a, &b, &c)) {
if (b > a && b > c)
tmp = a, a = b, b = tmp;
if (c > a && c > b)
tmp = a, a = c, c = tmp;
if(c > b)
tmp = b, b = c, c = tmp;
i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329133/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329133/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
#define bit(n,m)(((n)>>(m))&1)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329184/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329184/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
long long int a,b=1,c,d=1000000000000000000;
scanf("%lld",&a);
for(int i=0;i<a;i++)
{
scanf("%lld",&c);
if(c==0)
{
printf("0");
return 0;
}
b = b * c;
if(c>d)
{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329241/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329241/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
int main(){
long N,A[100000],result=1,flag=1;
scanf("%ld",&N);
for(int i=0;i<N;i++){
scanf("%ld",&A[i]);
if(A[i]==0){
printf("0");
return 0;
}
if(1>(long)1e18/result/A[i]){
flag=0;
}
else result=result*A[i];
}
if(flag==0)puts("-1");
else printf("%ld\n",resu... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329285/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329285/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
long long a [100010];
int main (){
int n;
scanf("%d",&n);
for(int i=0;i<n;i++) scanf("%lld",&a[i]);
int zero =0;
for(int i=0;i<n;i++)if(a[i]==0) zero ++;
if(zero >0){
printf("0\n");
return 0;
}
long long prod =1;
for(int i=0;i<n;i++){
if(a[i ] <=1000000000000000000/ prod ){
prod *=a... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329328/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329328/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
long long a[100010];
int main()
{
int n;
scanf("%d",&n);
for(int i=0;i<n;i++)
scanf("%lld",&a[i]);
int zero=0;
for(int i=0;i<n;i++)
if(a[i]==0)zero++;
if(zero >0)
{
printf("0\n");
return 0;
}
long long prod=1;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329379/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329379/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
long long a[100010];
int main(){
int n;
scanf("%d",&n);
for(int i=0;i<n;i++)scanf("%lld",&a[i]);
int zero=0;
for(int i=0;i<n;i++)if(a[i]==0)zero++;
if(zero>0){
// a[i] contains 0
printf("0\n");
return 0;
}
long long prod=1;
for(int i=0;i<n;i++){
if(a[i]<=1000000000000000000/prod){
// This condition is... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329421/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329421/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int main(){
long long int n, i,ans=1;
double dans=1;
scanf("%lld",&n);
long long int *arr = (long long int*)malloc(n*sizeof(long long int));
for(i=0;i<n;i++){
scanf("%lld",arr+i);
if(arr[i] == 0){
printf("%d\n",0);
retu... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329465/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329465/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
typedef long long ll;
int main()
{
int n,flag=0;
scanf("%d",&n);
ll a[n];
for(int i=0;i<n;i++)
{
scanf("%lld",&a[i]);
if(a[i]==0)
{
flag=2;
}
}
ll ans=1;
int i=0;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329508/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329508/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(){
int n, h[100000+1]={0};
scanf("%d", &n);
for(int i=0; i<n; i++){ scanf("%d", &h[i]); }
int cnt=0, ans=0;
for(int i=0; i<n-1; i++){
if( h[i] >= h[i+1] ){ cnt++; }
else { cnt=0; }
if( cnt > ans ){ ans = cnt; }
}
printf("%d\n", ans);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329559/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329559/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int inputN;
long int *inputH, moveCount = 0, maxMoveCount = 0;
scanf("%d", &inputN);
inputH = (long int *)malloc(sizeof(long int) * inputN);
for (int count = 0; count < inputN; count++)
{
scanf("%ld", &inputH[count]);
}
for... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329601/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329601/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
//Compiler version gcc 6.3.0
int main()
{
long long int n;
long long int count=0,max=0,i,k,j;
scanf("%lld",&n);
long long int a[n];
for(i=0;i<n;i++)
scanf("%lld",&a[i]);
for(i=0;i<n-1;i++)
{
k=i;
j=i+1;
while(a[k]>=a[j])
{
k++;
count++;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329645/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329645/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main() {
int n, max = 0, contador = 0;
scanf("%d", &n);
int h[n];
for(int i = 0;i < n; ++i){
scanf("%d", &h[i]);
if (i != 0){
if (h[i-1] >= h[i]){
++contador;
} else {
if (contador > max) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329689/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329689/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#define MAX(X, Y) (((X) > (Y))? (X) : (Y))
#define MIN(X, Y) (((X) < (Y))? (X) : (Y))
int compare_int(const void *a, const void *b){
return *(long int*)b - *(long int*)a; // 大きい順
}
// 15min
int main(void){
int n;
int cnt = 0;
int max =... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329731/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329731/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
int N, tmp, past;
int cnt = 0;
int cnt_max = 0;
scanf("%d", &N);
scanf("%d", &past);
cnt = 0;
for (int i = 0; i < N - 1; i++)
{
scanf("%d", &tmp);
if (past >= tmp)
{
cnt++;
}
else
{
if (cnt > cnt_max)
{
cnt_max = cnt... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329775/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329775/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
// AOJ 0121: Seven Puzzle
// 2017.8.4 bal4u@uu
// 2017.11.1 retry
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define HASHSIZ 52009 // must > 20160
typedef struct { int s; char v; } HASH;
HASH hash[HASHSIZ+3], *hashend = hash + HASHSIZ;
int lookup(int s)
{
HASH *hp = hash + s % HASHSIZ;
while (hp-... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329818/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329818/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.HASH = type { i32, ... |
#include <stdio.h>
#define Mod 1000000007
int main()
{
int N, K;
scanf("%d %d", &N, &K);
int i;
long long ans = 0;
for (i = K; i <= N + 1; i++) ans = (ans + ((long long)N * 2 - i + 1) * i / 2 - (long long)i * (i - 1) / 2 + 1) % Mod;
printf("%lld\n", ans);
fflush(stdout);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329861/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329861/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
long long n,k,i;
long long s=0;
scanf("%lld%lld",&n,&k);
for(i=k;i<=n+1;i++)
{
s=(s+(n-i+1)*i+1)%1000000007;
}
printf("%d",s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329904/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329904/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#define mod 1000000007
int main(void) {
long long n, k, ans = 0;
scanf("%lld%lld", &n, &k);
for (; k <= n + 1; k++) {
ans += (n - k + 1) * k + 1;
ans %= mod;
}
printf("%lld\n", ans);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329948/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329948/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#define lint long long int
#define N_MAX 200001
#define DIV 1000000007
int main()
{
int n, k;
scanf("%d %d", &n, &k);
lint cum_sum[N_MAX]; cum_sum[0] = 0;
for (int i = 1; i <= n; i++) cum_sum[i] = cum_sum[i-1] + i;
lint ans = 0;
for (int i = k; i < n+1; i++) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329991/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329991/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
int main()
{
char s[10000];
scanf(" %[^\n]",s);
printf("%c",s[0]);
for(int i=0;i<strlen(s);i++){
if(s[i]==' '){
printf("%c",s[i+1]);
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330032/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330032/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
char a[8], str[101], c[8];
char m;
scanf("%s%s%s", a, str, c);
m = str[0];
printf("A%cC", m);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330076/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330076/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int main(void)
{
int t;
char a[101], b[101], c[101];
scanf("%d", &t);
while (t--)
{
scanf("%s", a);
scanf("%s", b);
scanf("%s", c);
int length = (int)strlen(a);
int flag = 1;
for (int i = 0; i < length; i++)
{
if (a[i]==c[i]||b[i]==c[i]) continue;
else
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_33017/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_33017/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
int main(){
char a[100],b[100],c[100];
char ans[10];
int i,j,k,l;
scanf("%s %s %s",a,b,c);
ans[0]=b[0];
printf("A%cC\n",b[0]);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330270/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330270/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int x,a,b;
scanf("%d %d %d", &x,&a,&b);
int xa,xb;
if(x>a){
xa=x-a;
}
else xa=a-x;
if(x>b){
xb=x-b;
}
else xb=b-x;
if(xa<xb){
printf("A");
}
else printf("B");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330313/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330313/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#define ABS(X) (((X)>=0)?(X):(-(X)))
int main () {
int x, a, b;
scanf ("%d %d %d", &x, &a, &b);
if (ABS(x-a)>ABS(x-b))
printf ("B\n");
else
printf ("A\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330371/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330371/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int main(void){
int x, a, b;
scanf("%d%d%d", &x, &a, &b);
long c = labs(x-a);
long d = labs(x-b);
if(c < d){
printf("A\n");
}else if(c > d){
printf("B\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330429/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330429/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
int main(void)
{
char a[110],b[110],c[110];
int i,n,k=0,j;
int t;
scanf("%d",&t);
while(t--)
{
k=0;
scanf("%s%s%s",a,b,c);
n=strlen(a);
for(i=0; i<n; i++)
{
if((a[i]==c[i])||(b[i]==c[i]))
con... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_33048/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_33048/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
#include<stdlib.h>
int main(void) {
// your code goes here
int x,a,b;
scanf("%d %d %d",&x,&a,&b);
if(abs(x-a)>abs(x-b))
printf("B\n");
else
printf("A\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330559/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330559/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.