Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> int main(){ int n; int A=0; scanf("%d",&n); int h[n+1]; int ans[n+1]; for(int i=1;i<=n;i++){ scanf("%d",&h[i]); ans[i]=0; } h[0]=0; h[n+1]=h[n]+1; for(int i=1;i<=n;i++){ if(h[i]>=h[i-1]){ for(int j=1;j<=n-i+1;j++){...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329710/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329710/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,j,l=0,m,n=0,o=0; scanf("%d",&j); for(i=0;i<j;i++){ scanf("%d",&m); if(l>=m){ n++; }else{ if(n>o){ o=n; } n=0; } l=m; } if(n>o){ o=n; } printf("%d",o); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329754/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329754/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 input_i(x) scanf("%d", &x) #define input_lli(x) scanf("%lld", &x) #define input_s(x) scanf("%s", x) #define BUFSIZE 100000 int main(int argc, char const *argv[]) { int N, i, buf= 0, ans= 0; input_i(N); long long int H, p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329798/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329798/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 1369: Distribution Center // 2017.11.3 bal4u@uu #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct { int x, y; } PP; PP p[100002], p2[100002]; int l[200002], r[200002]; int m; char buf[20], *bp; int getint() { int n = 0; while (*bp >= '0') n = (n<<3) + (n<<1) + (*bp++ & 0xf); return ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329840/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329840/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.PP = type { i32, i3...
#include<stdio.h> int main() { int N,K; unsigned long long sum1=0,sum2=0,i,m=1000000007,a; scanf("%d%d",&N,&K); for(i=K;i<=(N+1);i++){ sum1=(sum1+i)%m; } for(i=K;i<=(N+1);i++){ sum2=(sum2+i*(i-1))%m; } a=(N*sum1+N-K+2-sum2)%m; printf("%llu\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329884/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329884/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 a,b,c=0,d=0,n,i; scanf("%lld %lld",&a,&b); for(i=b;i<=a+1;i++) { c=i*(a+1-i)+1; d=d+c; d%=1000*1000*1000+7; } printf("%lld",d); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329934/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329934/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 int ans = 0, usum = 0, dsum = 0; int N, K; scanf("%d%d", &N, &K); for (int i = 0; i < K; i++) { usum += i; dsum += (long long int)N - (long long int)i; } for (int i = K; i <= N; i++) { ans += dsum - usum + 1; ans = ans % (1000000007); usum += i; dsum += (long...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329985/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329985/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 c[100]; scanf("%s", c); scanf("%s", c); printf("A%cC\n", c[0]); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330026/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330026/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 MAX_N 100007 int nTest; int n; int a[MAX_N]; int min(int a, int b) { if (a < b) { return a; } return b; } int max(int a, int b) { if (a > b) { return a; } return b; } int main() { scanf("%d", &nTest); for (int iTest = 1; iTest <= nTest; ++iTest...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_33007/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_33007/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[1000],b[1000],c[1000]; scanf("%s%s%s", a,b,c); printf("A%cC\n",b[0]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330112/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330112/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 a[100],b[100],c[100]; while(scanf("%s%s%s",&a,&b,&c) != EOF) { printf("A"); printf("%c",b[0]); printf("C\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330156/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330156/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 d[10001]; int main(void) { int sum,i,n,m; int a,b,c; while(scanf("%d %d",&n,&m)!=EOF) { sum=0; memset(d,0,sizeof(d)); for(i=1;i<=m;i++) { scanf("%d %d %d",&a,&b,&c); d[a]=d[a]-c; d[b]=d[b]+c; } for(i=1;i<=n;i++) { if(d[i]>0) sum=sum+d[i];...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_3302/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_3302/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 co...
#include <stdio.h> int main() { int X, A, B; scanf("%d %d %d", &X, &A, &B); int distA = (X > A) ? X - A : A - X; int distB = (X > B) ? X - B : B - X; (distA < distB) ? puts("A") : puts("B"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330293/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330293/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, lal, lbl; scanf("%d %d %d", &x, &a, &b); lal = abs(a - x); lbl = abs(b - x); if (lal < lbl) printf("A\n"); else printf("B\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330343/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330343/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 zet(int a){ if(a > 0){ return a; } return -a; } int main(){ int x,a,b; scanf("%d %d %d",&x,&a,&b); if(zet(x - a) > zet(x - b)){ printf("B\n"); }else{ printf("A\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330387/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330387/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; int dA, dB; scanf("%d %d %d", &x, &a, &b); dA = x - a; dB = x - b; if(dA < 0) dA = -dA; if(dB < 0) dB = -dB; if(dA > dB) printf("B\n"); else printf("A\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330444/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330444/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; scanf("%d",&x); int a; scanf("%d",&a); int b; scanf("%d",&b); int C1,C2; C1=x-a; C2=x-b; if (C1>0) C1=C1; else C1=(-C1); if (C2>0) C2=C2; else C2=(-C2); if (C1>C2) printf("B"); else ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330501/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330501/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() { int x, a, b; int kyori2_a,kyori2_b; scanf("%d %d %d",&x,&a,&b); kyori2_a = (x-a)*(x-a); kyori2_b = (x-b)*(x-b); if(kyori2_a < kyori2_b){ printf("A\n"); }else{ printf("B\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330567/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330567/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<math.h> #include<stdlib.h> int main() { int n,m,i,j,k,l,arr[5009],t,q,r,x,y,z,brr[5009],crr[5009]; scanf("%d",&t); while(t--){ scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%d",&arr[i]); if(arr[i]==1) q=i; } r=0; x=0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_33061/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_33061/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> #include <math.h> #include <limits.h> #include <string.h> #define ll long long int int main() { int X , Y; scanf("%d %d",&X,&Y); int res = X + Y/2; printf("%d",res); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330653/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330653/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); printf("%d\n",A+(B/2)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330697/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330697/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,X,Y; scanf("%d%d",&X,&Y); x=X+Y/2; printf("%d",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330790/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330790/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,Y; scanf("%d %d",&X,&Y); printf("%d\n",X + Y/2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330833/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330833/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, Y,num; scanf("%d %d", &X, &Y); num = Y / 2; num += X; printf("%d", num); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330877/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330877/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 <stdbool.h> #include <math.h> int main() { int x, y; scanf("%d%d", &x, &y); int ans = x + y/2; printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330934/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330934/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, Y; scanf("%d %d", &X, &Y); printf("%d\n", X+Y/2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330978/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330978/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,j,n,arr[101],c[101]={0},max=0; scanf("%d",&n); for(i=0;i<n;++i){ scanf("%d",&j); ++c[j]; if(c[j]>max) max=c[j]; } printf("%d",max); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_33102/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_33102/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(void){ int x,y; scanf("%d %d",&x,&y); printf("%d",x+y/2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331063/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331063/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> #define HWMAX 50 int h, w; char field[HWMAX][HWMAX]; int bfs(void); int main(void) { int i, j, res, ans = 0; scanf("%d %d%*c", &h, &w); for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { field[i][j] = getchar_unlocked(); if (field[i][j] == '.') ans++; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331106/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331106/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> #include <string.h> int main(void) { char str[201], tmp[101]; char p[101]; int slen, plen; int i, j, flag; scanf("%s %s", str, p); strcpy(tmp, str); strcat(str, tmp); slen = strlen(str); plen = strlen(p); flag = 0; for (i = 0; i < slen - plen; i++) { if (strncmp(&str[i], p, plen...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331157/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331157/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,j; scanf("%d",&n); int arr[n]; for(i=0;i<n;i++) { scanf("%d",&arr[i]); } int num,max=0; for(i=0;i<n;i++) { for(j=0;j<n;j++) { if(arr[i]==arr[j]) { num++; } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_33120/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_33120/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 S[201],P[101]; int i,j,ns=0,np=0; scanf("%s %s",S,P); for(i=0;S[i]!='\0';i++){ ns++; } for(i=0;P[i]!='\0';i++){ np++; } for(i=0;i<ns;i++){ S[ns+i] =S[i]; } S[2*ns-1]='\0'; int check; for(i=0;i<2*ns;i++){ check=0; if(P[0]==S[i]){ for(j=0;j<np;j++){ if(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331250/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331250/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 txt[201],txt2[101],word[101]; int i=0,j=0,res=0,k=0,n=0; scanf("%s",txt); scanf("%s",word); strcpy(txt2,txt); strcat(txt,txt2); for(i=0;i<201;i++){ for(j=0;j<101;j++){ if(word[j]=='\0'){ res=1; break; } else if(word[j]==txt...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331294/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331294/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 a[200], b[100], r[200]; scanf("%s", a); scanf("%s", b); strcpy(r,a); strcat(r,a); if (strstr(r,b)) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331351/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331351/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 ring[101],ch[101]; int i,j,n,m,X,N=0; scanf(" %s",ring); scanf(" %s",ch); n=strlen(ring); m=strlen(ch); for(i=0;i<n;i++){ if(ch[0]==ring[i]){ if(m==1){ printf("Yes\n"); N=1; break;} else{ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331395/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331395/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>//c??§aoj Ring #include <string.h> int main(void) { char s[100], p[100]; int i, j, count=0, a=0; scanf("%s", s); scanf("%s", p); for (i=0;i<=strlen(s);i++) { count=0; if (p[0] == s[i]) { for (j=0;j<=strlen(p)-1;j++) { if (strlen(s) > i+j) { if (s[i+j] != p[j]) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331445/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331445/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(){ int i,k,j,lens,lenp,cnt,yes=0; char s[101],p[101]; scanf("%s",s); scanf("%s",p); lens=strlen(s); lenp=strlen(p); for(i=0;i<lens;i++){ j=0; cnt=0; for(k=i;k<i+lenp;k++){ if(s[k%lens]==p[j]){ j++; cnt++; }else{ break; } } if(cnt==len...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331489/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331489/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 str[101], p[101]; int slen, plen, last, index, i, j, k, flag = 0; scanf("%s\n", str); scanf("%s\n", p); slen = strlen(str); plen = strlen(p); last = plen-1; for(i = 0; i < slen; i++){ if(str[i] == p[0]){ index = i-1; for(j = 0; j < plen; j++)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331531/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331531/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 SIZE 101 int main(void) { int slen, plen, i, j; char s[SIZE], p[SIZE], c; for( i=0; (s[i]=getchar()) != '\n'; ++i) ; slen = i; for( j=0; (p[j]=getchar()) != '\n'; ++j) ; plen = j; for ( i=0; i<slen; ++i) for ( j=0; j<plen; ++j...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331575/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331575/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" @stdin = external local_unn...
#include <stdio.h> #include <string.h> int main(){ char s[101], p[101], n[201]; scanf("%s", s); scanf("%s", p); strcpy(n, s); strcat(n, s); if (strstr(n, p) != NULL) { printf("Yes\n"); }else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331618/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331618/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> #define N 100 int calc_len(char s[N]){ int count=0; int d=0; while(1){ d=s[count]; if((d>=97) && (d<=122)){ count++; }else{ return count; } } return count; } int calc(char s[N],char p[N]){ int s_len=calc_len(s); int p_len=calc_len(p); in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331661/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331661/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 s[100]={}; char p[100]={}; char s1[100]={}; int len,i,j,a,cmp; scanf("%s",s); scanf("%s",p); len=strlen(p); for(i=0;i<100;i++){ if(s[i]==p[0]){ a=i; for(j=0;j<len;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331719/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331719/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> typedef struct{ int a[6]; } cube; int main(){ cube x,tmp; int i; char c,dekoi; for(i=0;i<6;i++){ scanf("%d",&x.a[i]); } scanf("%c",&dekoi); while(1){ for(i=0;i<6;i++){ tmp.a[i] = x.a[i]; } scanf("%c",&c); if(c == '\n') break; x = tmp; if(c == 'E'){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331805/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331805/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.cube = type { [6 x ...
#include<stdio.h> #include<string.h> void N(int dice[]); void E(int dice[]); void S(int dice[]); void W(int dice[]); int main(void){ int dice1[6]; char dir[101]; int len,i; scanf("%d %d %d %d %d %d",&dice1[0],&dice1[1],&dice1[2],&dice1[3],&dice1[4],&dice1[5]); scanf("%s",&dir); len=strlen(dir); for(i=0;i<len;i++...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331863/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331863/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> typedef struct dice{ int men[6]; } Dice; int main(void) { Dice dice, dice_memo; char s[101]; int i, j; for(i = 0; i < 6; i++) scanf("%d", &dice.men[i]); for(j = 0; j < 6; j++) dice_memo.men[j] = dice.men[j]; scanf("%s", s); i = 0; while(s[i]){ switch(s[i])...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331920/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331920/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.dice = type { [6 x ...
#include <stdio.h> typedef struct { int face[6]; } Dice; int main(void) { Dice dice; char operation[101]; int i; for(i = 0; i < 6; ++i) { scanf("%d", &dice.face[i]); } scanf("%s", &operation); int temp; for(i = 0; operation[i] != '\0'; ++i) { switch(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331964/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331964/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.Dice = type { [6 x ...
#include <stdio.h> #include <string.h> typedef struct{ int face[6]; }cube; int rotation(char,cube*); int rotation(char direction,cube *C){ int temp; //cube C; switch(direction){ case 'N': temp=C->face[4]; C->face[4]=C->face[0]; C->face[0]=C->face[1]; C->face[1]=C->face[5]; C->face[5]=temp; break;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332028/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332028/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.cube = type { [6 x ...
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #define _USE_MATH_DEFINES #include <math.h> #include <string.h> typedef struct dice { int label[6]; int direction[6]; // 転がしたときに対応するラベル }Dice; void diceRotation(Dice *dice, char order) { int tmpDirc[6] = { 0 }; for (size_t i = 0; i < 6; i++) { tmpDirc[i] ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332071/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332071/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.dice = type { [6 x ...
#include <stdio.h> int main(void){ int i,dice[7]; char order[101]; for(i=1;i<7;i++) scanf("%d", &dice[i]); scanf("%s", order); for(i=0;order[i]!='\0';i++){ dice[0] = dice[1]; switch(order[i]){ case 'E': ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332114/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332114/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 boido void #define innto int #define suitti switch #define keesu case #define bureeku break #define meinn main #define chaa char #define foa for #define ifu if #define ritaann return #define sukyannefu scanf #define purinntoefu printf boido kaitenn(innto daisu[6], innto komanndo) { innto te...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332165/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332165/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 <memory.h> int main(void){ int n,i,c,t,p[51]={0}; while(1){ scanf("%d",&n); if(!n) break; memset(p,0,sizeof(p)); for(i=0;i<n;i++) scanf("%d",&p[i]); for(i=0;i<n;i++){ t=p[i]; c=0; if(i!=0) printf(" "); for(;p[i]+1==p[i+1];i++) c++...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332222/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332222/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 m[14],w[10],w2[10],a[9]; void f0(int *ws,int *k) { int j; for(j=1;ws[j]==0;j++); if(ws[j]>2) { ws[j]-=3; (*k)++; } } void f1(int *ws,int *k) { int j; for(j=1;j<8;) { if(ws[j]>0&&ws[j+1]>0&&ws[j+2]>0) { ws[j]--;ws[j+1]--;ws[j+2]--;(*k)++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332273/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332273/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 s=0,n,m,i,j,k,d[3][110],r[3][110],rr[3][110],c[110][110][110],b; int main(){ scanf("%d %d",&n,&m); for(i=0;i<n*2;i++){ for(j=0;j<3;j++){ scanf("%d",&d[j][i]); for(k=i;k&&d[j][r[j][k-1]]>d[j][i];k--)r[j][k]=r[j][k-1]; r[j][k]=i; } } for(i=0;i<n*2;i++){ for(j=0;j<3;j++)rr[j]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332330/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332330/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" @s = dso_local local_unname...
#include <stdio.h> int main(void) { int kisu_f=0,gusu_f=0,i; char s[200]; scanf("%s",s); i=0; while(s[i] != '\0'){ if(i%2 == 0){//奇数文字目 //printf("i=%d, s[i] = %c\n",i,s[i]); if(s[i] != 'R' && s[i] != 'U' && s[i] != 'D'){ kisu_f=1; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332381/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332381/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 s[110]; int i; int bool = 1; for (i = 0; i < 110; i++) s[i] = 0; scanf("%s", s); i = 0; while (s[i] != 0) { if (s[i] == 'L') { bool = 0; printf("No"); break; } i += 2; } if (bool == 0) return 0; i = 1; while (bool&& s[i] != 0) { if (s[i] == '...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332431/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332431/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...
/* ABC141-B Takatan */ #include<stdio.h> int main(void){ char dance[101]={}; int flag, i; flag = 1; i = 0; scanf( "%s" , dance); while(flag==1&&dance[i]!='\0'){ flag = 0; /* 初期化 */ if(dance[i]=='U'||dance[i]=='D'){ flag = 1; /* 踏みやすいことを示す */ }else if(i%2...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332475/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332475/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 = 0; int count = 0; char S[101]; scanf("%s", S); while(S[i] !='\0'){ if(i%2==0){ if(S[i]=='R'||S[i]=='U'||S[i]=='D'){ count = count +0; } else {count++;}} else if(i%2==1){ if(S[i]=='L'||S[i]=='U'||S[i]=='D'){ count = count + 0;} else {count++...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332518/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332518/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 odd[3][2] = {"R","U","D"}; char even[3][2] = {"L","U","D"}; char S1[101], S2[101]; scanf("%s", S1); int len = strlen(S1); strcpy(S2, S1); for (int i = 0; i < len; i++) { int val = 1; int tmp = 0; if (i%2 == 1) val = 0; for (int j = 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332569/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332569/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> int main(){ int i,n; char str[101]; scanf("%s",str); n=strlen(str); for(i=0;i<n;i++){ if(i%2==0&&str[i]=='L'){ printf("No\n"); return 0; } if(i%2==1&&str[i]=='R'){ printf("No\n"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332619/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332619/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> #define S_MAX 101 int main(void){ int i; char s[S_MAX]; scanf("%s", s); for(i=0; i<strlen(s); i++){ if(i%2 == 0){ if(s[i] == 'L'){ printf("No\n"); return 0; } }else{ if(s[i] == 'R'){ printf("No\n"); return 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332662/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332662/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 DSL_2_A Range Minimum Query (RMQ) // 2018.5.5 bal4u #include <stdio.h> #include <stdlib.h> #define INF 0x7fffffff #if 1 #define gc() getchar_unlocked() #define pc(c) putchar_unlocked(c) #else #define gc() getchar() #define pc(c) putchar(c) #endif int in() { int n = 0, c = gc(); do n = 10*n + (c & 0xf), c = ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332705/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332705/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 min(int x, int y) { return x < y ? x : y; } int main() { int a, b, n; scanf("%d%d%d", &n, &a, &b); printf("%d\n", min(a * n, b)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332749/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332749/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 *argv[]) { int n, a, b; scanf("%d %d %d", &n, &a, &b); printf("%d\n", a * n > b ? b : a * n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332792/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332792/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); if(x<=b/a)printf("%d",x*a); else printf("%d",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332842/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332842/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, mult; scanf("%d%d%d", &N, &A, &B); mult = N*A; if(mult <= B) { printf("%d\n", mult); } else { printf("%d\n", B); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332886/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332886/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 t,money,m; scanf("%d %d %d",&t,&money,&m); int n=t*money; if(n<m) printf("%d",n); else if(n==m) printf("%d",m); else printf("%d",m); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332943/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332943/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() { int a,b,c; int s; scanf("%d %d %d",&a,&b,&c); s=a*b; if(s>c) printf("%d\n",c); else printf("%d\n",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_332987/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_332987/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 k,a,b; int bisa = 0; scanf("%d", &k); scanf("%d %d", &a, &b); for(int i=a; i<=b; i++){ if(i%k==0){ bisa = 1; } } if(bisa == 1){ printf("OK\n"); } else if(bisa == 0) { printf("NG\n"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333036/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333036/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 t, l, r; int main() { scanf("%d", &t); while (t >= 1) { scanf("%d %d", &l, &r); if (r / 2 + 1 >= l) printf("%d\n", r - (r / 2 + 1)); else printf("%d\n", r - l); t--; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_33308/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_33308/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() { int n,x,y,c=0; scanf("%d%d%d",&n,&x,&y); for(int i=x;i<=y;i++) { if(i%n==0) c++; if(c==1) break; } if(c==1) printf("OK\n"); if(c==0) printf("NG\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333122/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333122/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 k, a, b; scanf("%d", &k); scanf("%d%d", &a, &b); int o=(b/k)*k; if (a<=o){ printf("OK"); } else { printf("NG"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333166/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333166/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 k,a,b; scanf("%d%d%d",&k,&a,&b); for(int i=a;i<=b;i++){ if(i%k==0){ printf("OK"); return 0; } } printf("NG"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333209/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333209/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 <limits.h> #include <string.h> #include <stdlib.h> #define scd(t) scanf("%d",&t) #define scld(t) scanf("%ld",&t) #define sclld(t) scanf("%lld",&t) #define scc(t) scanf("%c",&t) #define scs(t) scanf("%s",t) #define scf(t) scanf("%f",&t) #define prd(t) printf("%d",t) #defin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333252/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333252/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 k,a,b,i=0; scanf("%d",&k); scanf("%d",&a); scanf("%d",&b); if((b - a + 1) >= k){ printf("OK"); return 0; } for(i=a;i<=b;i++){ if((i % k)==0){ printf("OK"); return 0; } } printf("NG"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333296/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333296/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 k,a,b,i; scanf("%d",&k); scanf("%d%d",&a,&b); for(i = a;i <= b;i++){ if(i%k == 0){ printf("OK"); break; }else if(i == b){ printf("NG"); break; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333339/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333339/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 k,a,b; int temp; scanf("%d %d %d",&k,&a,&b); if(a%k==0){ printf("OK"); }else{ temp = a-a%k+k; if(temp<=b) printf("OK"); else printf("NG"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333382/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333382/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 rep(i,a,b) for(int i = a; i <= b;i++) int main(void){ int k,a,b; scanf("%d",&k); scanf("%d%d",&a,&b); int count = 0; rep(i,a,b){ if(i%k == 0){ printf("OK"); count ++; break; } } if(count == 0){ printf("NG"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333425/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333425/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, K, x; scanf ("%d%d%d", &K, &A, &B); x = B / K; if (x*K >= A) { printf("OK"); } else { printf("NG"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333469/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333469/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 k,a,b; scanf("%d%d%d",&k,&a,&b); if(a/k!=b/k || a%k==0 || b%k==0) printf("OK\n"); else printf("NG\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333511/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333511/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 K,A,B; int cnt=0; scanf("%d",&K); scanf("%d %d",&A,&B); for(A; A <= B; A++){ if(A % K == 0){ cnt = 1; } } if(cnt){printf("OK\n");}else printf("NG\n"); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333555/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333555/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 K; int i; scanf("%d", &K); scanf("%d %d", &A, &B); for(i = A; i <= B; ++i){ if(i % K == 0){ printf("OK\n"); return 0; } } printf("NG\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333599/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333599/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 d,t,s; scanf("%lld %lld %lld",&d,&t,&s); long long ans = t*s; if(ans >= d){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333641/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333641/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 D = 0; int T = 0; int S = 0; scanf("%d %d %d", &D, &T, &S); if((double)D / S <= T) printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333692/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333692/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 d,t,s,dist; scanf("%d %d %d",&d,&t,&s); dist=s*t; if(d<=dist) { printf("Yes"); } else printf("No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333735/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333735/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 d, t, s; scanf("%d %d %d", &d, &t, &s); if(t*s >= d) { puts("Yes"); } else { puts("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333779/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333779/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 D,T,S; scanf("%d%d%d",&D, &T, &S); int a = T*S; if(a >= D){ printf("Yes"); } else{ printf("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333821/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333821/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 d,t,s; scanf("%d %d %d",&d,&t,&s); if(d>t*s){ printf("No"); }else{ printf("Yes"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333865/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333865/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 d, t, s; scanf("%d", &d); scanf("%d", &t); scanf("%d", &s); int need_time = d%s == 0 ? d/s : d/s + 1; if(t < need_time){ printf("No\n"); } else{ printf("Yes\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333908/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333908/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 d,t,s; scanf("%d%d%d",&d,&t,&s); if(t*s>=d){printf("Yes\n");} else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_333959/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_333959/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) { int d, t, s; scanf("%d%d%d", &d, &t, &s); if (t * s >= d) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_334000/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_334000/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,K,P,i; scanf("%d",&N); for(i=1;i<=N;i++){ scanf("%d%d",&K,&P); if(K%P==0){printf("%d\n",P);} else{printf("%d\n",K%P);} } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_334044/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_334044/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,k,p,i; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d%d",&k,&p); printf("%d\n",k%p==0?p:k%p); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_334088/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_334088/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,K,P,i; scanf("%d",&N); for(i=0;i<N;i++){ scanf("%d %d",&K,&P); if(K%P==0){ printf("%d\n",P); }else{ printf("%d\n",K%P); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_334130/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_334130/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 str[2000]; char ans[2000]; int x, y, len; scanf("%s", str); len = strlen(str); for (x = 0; x < len; x++) { if (str[x] == 'A') { ans[x] = 'X'; } else if (str[x] == 'B') { ans[x] = 'Y'; } else if (str[x] == 'C') { ans[x] = 'Z'; }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_334174/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_334174/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[]="XYZABCDEFGHIJKLMNOPQRSTUVWXYZ"; char b[1001]; int i=0,o=0; scanf("%s",b); while(b[i]){ while(a[o]){ if(b[i] == a[o] && o>=3){ b[i]=a[o-3]; break;}o++; }o=0; i++; } printf("%s",b); printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_334217/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_334217/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" @__const.main.a = private u...
#include <stdio.h> char buf[1024]; int main(void) { char *p; scanf("%s", buf); for (p=buf; *p; ++p) putchar((*p-'A'-3+26)%26+'A'); puts(""); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_334260/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_334260/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 i,len; char x[1005]; scanf("%s",&x); len=strlen(x); for(i=0;i<len;i++) { if(x[i]>='A' && x[i]<='C') { x[i]+=('X'-'A'); } else if(x[i]>='D' && x[i]<='Z') { x[i]-=('D'-'A'); } } printf("%s\n",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_334332/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_334332/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[]){ long long i,n,m,a,b,p=1000000007; scanf("%lld %lld",&n,&m); if(n==m){ a=1; for(i=n;i>0;i--){ a*=i; a%=p; } printf("%lld\n",(a*2%p)*a%p); }else if(n==(m+1)){ a=1; for(i=m;i>0;i--){ a*=i; a%=p; } b=a*n%p; printf("%lld\n",a*b%p); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_334383/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_334383/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 DEBUG 0 #define ADD 0 #define GETSUM 1 typedef struct Node Node; struct Node { int index; int weight; int child_count; Node* sibling; Node* left_most_child; }; Node* node_list[100000]; int* Eular_Tour; int Eular_Enter[100000]; in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_334433/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_334433/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.Node = type { i32, ...
#include<stdio.h> int main(){ int n,a,b,j=0,k=0,m=0; scanf("%d %d %d",&n,&a,&b); for(;n>=1;n--){ k=n; for(j=0;k!=0;){ j+=k%10; k/=10; } if(j>=a && j<=b){ m+=n; } } printf("%d",m); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_334477/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_334477/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...