Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> int main(){ int c[3][3]; int x, y; for(y = 0; y < 3; ++y){ for(x = 0; x < 3; ++x){ scanf("%d", &c[x][y]); } } char judge = 1; for(x = 0; x < 2; ++x){ for(y = 0; y < 2; ++y){ judge &= ((c[x][y] - c[x][y + 1]) == (c[x + 1][y] - c[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158026/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158026/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> #define REP(i,a,b) for(i=a;i<b;i++) #define rep(i,n) REP(i,0,n) #define ll long long void intSort(int d[],int s){int i=-1,j=s,k,t;if(s<=1)return;k=(d[0]+d[s-1])/2;for(;;){while(d[++i]<k);while(d[--j]>k);if(i>=j)break;t=d[i];d[i]=d[j];d[j]=t;}int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15807/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15807/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.struct_vector_int = t...
#include <stdio.h> #include <stdbool.h> #define rep(i,n)for(int i=0;i<(int)(n);i++) int main(){ char c[30009]={'0'}; int n, ans=0; bool f1,f2,f3; scanf("%d%s",&n,c); rep(i, 10) { rep(j, 10) { rep(k, 10) { f1=false;f2=false;f3=false; int x=0; while(!f1&&x<n){ f1=(c[x]-48==i); x++; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158112/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158112/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_158156/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158156/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 n;scanf("%ld",&n);printf("%ld",(n-1)*n/2);}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158206/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158206/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 N 32 char prefix[N], buf[N]; int main() { int i, j, n; scanf("%d", &n); scanf("%s", prefix); for(i = 1; i < n; i++) { scanf("%s", buf); for(j = 0; prefix[j] && buf[j]; j++) { if(prefix[j] != buf[j]) { strncpy(pref...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15825/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15825/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){ unsigned long long N = 0; unsigned long long sum1 = 0; scanf("%d", &N); sum1 = (N*(N-1))/2; printf("%llu", sum1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158293/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158293/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 <ctype.h> #define max(a, b) (((a) > (b)) ? (a) : (b)) /* 2個の値の最大値 */ #define min(a, b) (((a) < (b)) ? (a) : (b)) /* 2個の値の最小値 */ #define ENTER printf("\n") /* 改行プリント */ int DBG = 1; /* デバッグプリント 提出時は0 */ /* main **************************...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158336/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158336/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" @DBG = dso_local local_unna...
#include <malloc.h> #include <math.h> #include <stdio.h> #include <string.h> #include <stdlib.h> //ABC105C int main(void) { long long bit[100], n, k=2, i, cou=0, tmp=1, flag=0; scanf("%lld", &n); for(i=0; i<33; i++) bit[i]=0; if(n>0){ if(n%2==1) bit[0]=1; for(i=1; i<16; i++){ k*=2; n-...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158387/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158387/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; scanf("%d\n", &n); int a[n]; int i, j, k; for (i = 0; i < n; i++){ scanf("%d ", &a[i]); } for (i = 0; i < n; i++){ for (j = 0; j < n; j++){ for (k = 0; k < n; k++){ if ((a[i] + a[j]) == a[k]){ if (i != j){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15843/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15843/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> #define ll long long #define max(p,q)((p)>(q)?(p):(q)) //* //プラキュー(二分ヒープ)(最低限バージョン) //int PQhikaku(int i,int j);//jの方が優先度が高いならtrueを返す int PQhikaku(ll*heap,int i,int j){return heap[i]>heap[j];} void heap_utod(ll*heap,int n){ if(2*n>heap[0])return; int rflag=(2*n+1<=heap[0])&&(PQhi...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158473/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158473/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" @v = dso_local global [1000...
#include<stdio.h> int main(){long long a,b,c;scanf("%lld%lld%lld",&a,&b,&c);if((c-a-b)<=0){printf("No");return 0;}if(4*a*b<(c-a-b)*(c-a-b))printf("Yes");else printf("No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158523/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158523/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 long a, b, c; scanf("%lld%lld%lld",&a,&b,&c); if(c-a-b<0) puts("No"); else puts(4*a*b<(c-a-b)*(c-a-b)?"Yes":"No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158574/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158574/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,c; scanf("%ld%ld%ld",&a,&b,&c); if(c-a-b<0) printf("No"); else { if((a-b)*(a-b)>c*((2*a)+(2*b)-c)) printf("Yes"); else printf("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158617/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158617/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 h,w,x,i,k,j,n,r,a=0,m=1e9,d[20][1010],c[20]={};; scanf("%d %d %d",&h,&w,&x); for(i=0;i<h;i++){ for(j=0;j<w;j++)scanf("%1d",&d[i][j]); } n=1<<(h-1); for(i=0;i<n;i++){//printf("i%d\n",i); a=0; for(j=i;j;j/=2)a+=j%2; for(j=0;j<h;j++)c[j]=0; for(j=0;j<w;j++)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158660/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158660/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(){ double a, b; scanf("%lf", &a); scanf("%lf", &b); if(a > b) printf("GREATER"); else if(a < b) printf("LESS"); else printf("EQUAL"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158710/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158710/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 my_strlen(char *str){ int len = 0; while(str[len]){ len++; } return len; } int main(){ char A[101]; char B[101]; scanf("%s", A); scanf("%s", B); int a = my_strlen(A); int b = my_strlen(B); if(a>b){ printf("GREATER\n"); }else if(b>a){ pr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158754/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158754/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(void){ char a[120],b[120]; scanf ("%s%s",a,b); if (strlen(a)>strlen(b)){ printf ("GREATER\n"); } else if (strlen(a)<strlen(b)){ printf ("LESS\n"); } else { for (int i=0; i<strlen(a); i++) if (strn...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158804/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158804/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 a,b; scanf("%lf",&a); scanf("%lf",&b); if(a>b){ printf("GREATER\n"); }else if(a<b){ printf("LESS\n"); }else if(a==b){ printf("EQUAL\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158855/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158855/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=0,y=0; double dx=0.0,dy=0.0; int ho,ka=0; int pka=90; int i,j,k,l,m; char c; while (1){ scanf("%d",&ho); dx+=ho*sin(pka*M_PI/180); dy-=ho*cos(pka*M_PI/180); scanf("%c%d",&c,&ka); pka+=ka; if(ho==0&&ka==0)break; } x=dx; y=dy; printf("%d\n%d\...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158905/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158905/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(void) { double x, y, r; double d, a; x = y = 0.0; r = 90.0; while (1){ scanf("%lf,%lf", &d, &a); if (d == 0.0 && a == 0.0){ break; } x += cos(r / 180 * M_PI) * d; y += sin(r / 180 * M_PI) * d; r -= a; } printf("%d\n%d\n", (int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158949/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158949/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> #define PI 3.1415926535 int main() { float x=0,y=0,r; int i,j,d=90; for(;;){ scanf("%d,%d",&i,&j); if(i==0&&j==0)break; r=d*PI/180; x+=i*cos(r); y+=i*sin(r); d-=j; } printf("%d\n%d\n", (int)x,(int)y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159005/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159005/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> #define PI 3.1415926535897932384626433832795028841971693993751058209749445923078164 int main(){ int l,arg,theta; double x,y; x = y = 0.0; theta = 0; while(1){ scanf("%d,%d",&l,&arg); if(l == 0 && arg == 0){ break; } x += l*1.0*sin(theta*PI/180.0); y += l*1.0*cos...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159056/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159056/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 i,t,j,k,n,s=0,max=0,max2=0; scanf("%d\n",&t); for(i=0;i<t;i++) { s=0; scanf("%d\n",&s); j=(int)sqrt(s); if(j-sqrt(s)==0) printf("%d\n",j); else printf("%d\n",j+1); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1591/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1591/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(void) { int x, y, r, temp; scanf("%d %d", &x, &y); if (x < y) { temp = x; x = y; y = temp; } while (y > 0) { r = x % y; x = y; y = r; } printf("%d\n", x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159142/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159142/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 a[200004]; int main() { long long int t,n,i,j; scanf("%lld",&t); while(t--) { scanf("%lld",&n); if(n%4!=0) printf("NO\n"); else { printf("YES\n"); for(i=1,j=2;i<=n/2;i++,j+=2) { a[i]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15920/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15920/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<string.h> #include<math.h> int main() { int t; scanf("%d",&t); while(t--) { long n; scanf("%ld",&n); if((n/2)%2!=0) printf("NO\n"); else { printf("YES\n"); long long a[n],sum=0; for(long i=0;i<n/2;i++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15928/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15928/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 t,n,half; scanf("%d",&t); while(t--) { int i; scanf("%d",&n); half = n/2; if(half % 2 != 0) { printf("NO\n"); continue; } printf("YES\n"); for(i = 2; i<half*2+1; i+=2) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15933/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15933/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 a, b, tmp; scanf("%d%d", &a, &b); if(a < b){ tmp = a; a = b; b = tmp; } while(b != 0){ tmp = b; b = a % b; a = tmp; } printf("%d\n", a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159373/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159373/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 swap(int *x,int *y); int gcd(int x,int y); int main() { int x,y; scanf("%d%d",&x,&y); if(x < y)swap(&x,&y); printf("%d\n",gcd(x,y)); return 0; } int swap(int *x,int *y) { int tmp; tmp = *x; *x = *y; *y = tmp; } int gcd(int x,int y) { int r; while(y>0){ r = x % y;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159416/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159416/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<limits.h> int main() { long long int T; scanf("%lld",&T); while(T--) { long long int n,localmin=INT_MIN,localmax=0,sum=0; scanf("%lld",&n); long long int a[n]; for (long long int i = 0; i < n; ++i) { scanf("%lld",&a[i]); } if (n==1) { printf("%lld\n",a[0]); contin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15946/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15946/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, a, b; scanf ("%d %d" ,&x ,&y); if (x < y){ a = x; x = y; y = a; } while (y > 0){ b = x % y; x = y; y = b; } printf("%d\n" ,x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159502/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159502/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; int c,i,div; scanf("%d %d",&a,&b); if(a < b){ c = a; a = b; b = c; }else if(a == b){ printf("%d\n",a); return 0; } else {} for(div=a%b;div>0;){ div=a%b; a = b; b = div...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159546/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159546/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> int main(){ int p,poi; scanf("%d",&p); for(poi=0;poi<p;poi++){ long long int n,i,k=3,j,a,b,c,ppp; scanf("%lld",&n); //printf("%d\n",n); if(n%4!=0){ printf("NO\n"); } else{ printf("YES\n"); i=2; wh...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15959/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15959/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 x, y, r; int tmp; scanf("%d%d",&x,&y); if(x<y){ tmp = x; x = y; y = tmp; } r = x % y; while(r != 0){ x=y; y=r; r=x%y; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159632/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159632/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, d; scanf("%d%d",&x,&y); d=x%y; while(d!=0){ x=y; y=d; d=x%y; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159683/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159683/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,y,z,i; scanf("%d %d",&x,&y); if (x < y){ int t=x; x=y; y=t; } while(1){ z=x%y; if(z==0) break; x=y; y=z; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159733/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159733/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,m,res,r,a,b,d,i; scanf("%d%d",&n,&m); a=n; b=m; while(a!=0) { res=b%a; b=a; a=res; } printf("%d\n",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159791/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159791/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> void gcd(int max, int min) { int w = 1; while (w) { w = max % min; if (w) { max = min; min = w; } } printf("%d\n", min); } int main() { int x, y, z; scanf("%d %d", &x, &y); if (x > y) { gcd(x, y); } else if (x < y) { gcd(y, x); } else { printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159834/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159834/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 gcd(int x,int y){ if(x<y){ int a; a = y;y = x; x = a; } while(y>0){ int r=x%y; x=y; y=r; } return x; } int main(){ int x,y; scanf("%d%d",&x,&y); printf("%d\n",gcd(x,y)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159878/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159878/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, num1, num2, temp; scanf("%d %d",&x, &y); if(x >= y){ num1 = y; num2 = x; } else{ num1 = x; num2 = y; } while(1){ if(num2 % num1 == 0){ break; } temp = num2 % num1; num2 = num1; num1 = temp; } printf("%d\n", ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159928/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159928/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> void swap(int *x,int *y); int main(){ int x,y,r; scanf("%d%d",&x,&y); if(x < y) swap(&x,&y); r = x % y; while (r != 0) { x = y; y = r; r = x % y; } printf("%d\n", y); return 0; } void swap(int *x,int *y){ int tmp; tmp...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159979/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159979/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 a,n,k,p,count; float x; scanf("%d",&a); int i; for(i=0;i<a;i++){count=0; scanf("%d",&n); for(k=2;;k++){ p=pow(2,k)-1; if(n%p==0) {count=1; break;} } if(count==1){ printf("%d\n",n/p);} } return 0;}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16002/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16002/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 x,y,r,tmp; scanf("%d%d",&x,&y); if (x<y) { tmp=x; x=y; y=tmp; } while(1){ r=x%y; if (r == 0) break; x=y; y=r; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160063/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160063/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,z; scanf("%d %d",&a,&b); while(a%b !=0){ z = b; b = a % b; a = z; } printf("%d\n",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160106/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160106/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,p; long long int n,f,k,a[1000000],s,s1,z,o,i,j; scanf("%d", &t); for(p=0;p<t;p++) { k=2; s=0; f=0; z=1; s1=0; scanf("%lld", &n); for(o=0;o<n;o++) a[o]=0; for(i=0;i<n/2;i++) { a[i]=k; k=k+2; s=s+a[i]; } for(j=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16015/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16015/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 gcd(int a, int b) { if (b == 0) { return a; } else if (a > b) { return gcd(b, a%b); } else { return gcd(a, b%a); } } int main(void) { int x, y; scanf("%d %d", &x, &y); printf("%d\n", gcd(x, y)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160193/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160193/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,work; scanf("%d %d",&a,&b); if(a<b){ work=a; a=b; b=work;} while((work=a%b)!=0){ a=b; b=work;} printf("%d\n",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160236/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160236/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; int t; scanf ("%d %d", &a, &b); if (a<b) { t = a; a = b; b = t; } for (; a%b!=0;) { t = a%b; a = b; b = t; } printf ("%d\n", b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160308/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160308/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,amari,i,found; scanf("%d%d",&x,&y); if(x == y) found = x; else if(x>y) { amari=x%y; for(i=1;i<amari;i++) { if(y%i==0 && amari%i==0) found = i; } } else { amari=y%x; for(i=1;i<amari;i++) { if(x%i==0 && amari%i==0) found...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160359/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160359/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 gcd(int,int); int main(){ int x,y; int a; scanf("%d%d",&x,&y); a=gcd(x,y); printf("%d\n",a); return 0; } int gcd(int x,int y){ int r,a; if(x<y){ a=x; x=y; y=a; } while(y>0){ r=x%y; x=y; y=r; } return x; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160401/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160401/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> void yugu(int g,int h); int main() { int x,y; scanf("%d%d",&x,&y); if(1<=x && y<=pow(10,9)){ yugu(x,y); } return 0; } void yugu(int g,int h) { int a1,a2,b; if(g>h) { a1=g; a2=h; } else { a1=h; a2=g; } while(1) { b=a2; a2=a1%a2; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160445/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160445/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 gcd(int x, int y); int main() { int a, b; scanf("%d %d",&a, &b); printf("%d\n", gcd(a, b)); return 0; } int gcd(int x,int y){ return y ? gcd(y, x%y) : x; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160496/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160496/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 gcd(int ,int); int main() { int a,b,ans; scanf("%d%d",&a,&b); ans = gcd(a,b); printf("%d\n",ans); return 0; } int gcd(int a,int b) { int t; t=a%b; while(t != 0) { a=b; b=t; t=a%b; } return b; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160539/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160539/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,x,y; scanf("%d",&a); scanf("%d",&b); if(a<b){ x=a; a=b; b=x; } y=a%b; while(y!=0){ a=b; b=y; y=a%b; } printf("%d\n",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160582/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160582/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,y,box; scanf("%d %d",&x,&y); for(;;){ if(x%y==0) break;//yが最大公約数 box=x%y;//ユークリッドの互除法 x=y; y=box; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160625/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160625/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 gcd(int a, int b){ int n = b/2; int result; if(a%b==0) return b; else{ for(int i=1; i<=n; i++){ int flag = (a%i==0) & (b%i==0); if(flag == 1) result = i; } return result; } } int main(int argc, char const *argv[]){ // Input 2 natural numbers int a,b; s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160676/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160676/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 func1(int ,int); int main(){ int out; int x,y; scanf("%d %d",&x,&y); if(x < 1 || y > 1000000000) exit(2); out = func1(x,y); printf("%d\n",out); return 0; } int func1(int x,int y){ int a; int b; if (x > y) { a = y; y = x; x = a; } while ((b ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160719/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160719/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 n, a[100000], m, o, i, j, k, s; scanf("%d", &n); if (n == (n & -n))m = n >> 1; else for(m = n ; m != (m & -m) ; m ^= (m & -m)); for (i = 0 ; i < n ; ++i) scanf("%d", a + i); for (i = 1 ; i < n ; ++i){ s = 0; for (j = 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16077/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16077/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(){ int x, y, a, i; scanf("%d %d", &x, &y); if(!(x < 0 || y < 0 || x > 1000000000 || y > 1000000000)){ while(x != 0 && y != 0){ if(x > y) x = x % y; else y = y % x; } if(x == 0) printf("%d\n", y); else printf("%d\n", x); } r...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160812/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160812/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,key,d; scanf("%d %d",&x,&y); if(x<y){ key=x; x=y; y=key; } while(y>0){ d=x%y; x=y; y=d; } printf("%d\n",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160863/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160863/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,tmp,e; scanf("%d%d",&a,&b); if(a<b){ tmp=a; a=b; b=tmp; } e=a%b; while(e!= 0){ a=b; b=e; e=a%b; } printf("%d\n",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160906/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160906/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,num,amo,resnum=0,resamo=-1,i; scanf("%d",&n); for(i = 0; i < n; i++){ scanf("%d %d",&num,&amo); if(amo > resamo){ resamo=amo; resnum=num; } else if(amo == resamo && num < resnum){ resnum=num; } } printf("%d %d\n",resnum,resamo);...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160964/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160964/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() { char s[11]; scanf("%s",s); printf("%s",10*(s[5]-'0')+s[6]-'0'<=4?"Heisei":"TBD"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161020/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161020/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[11],H[11]="2019/04/30"; scanf("%s",S); for(int i=0;i<9;i++){ if(S[i]>H[i]){ printf("TBD\n"); return 0; } } printf("Heisei\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161079/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161079/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 ymd[12]={}; int i, y=0, m=0, d=0; scanf("%s", ymd); for(i=0;i<4;i++){ y=y*10; y+= (int)ymd[i]-'0'; } for(i=0;i<2;i++){ d=d*10; m=m*10; m+= (int)ymd[5+i]-'0'; d+= (int)ymd[8+i]-'0'; } if(y>2019){ printf("TBD"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161121/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161121/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 y, m, d, res; scanf("%d/%d/%d", &y, &m, &d); if(y > 2019){ res = 1; } else if(y == 2019){ if(m > 4){ res = 1; } else if(m == 4){ if(d > 30){ res = 1; } else if(d == 30){ res = -1; } else { res = -1; } } else { res = -1; } } else { res ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161165/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161165/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, a, b; scanf("%d/%d", &a, &b); if(b>4){ printf("TBD\n"); } else{ printf("Heisei\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161215/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161215/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) { char S[100], ANS[100], yyyymmdd[9]; scanf("%s", S); yyyymmdd[0]=S[0]; yyyymmdd[1]=S[1]; yyyymmdd[2]=S[2]; yyyymmdd[3]=S[3]; yyyymmdd[4]=S[5]; yyyymmdd[5]=S[6]; yyyymmdd[6]=S[8]; yyyymmdd[7]=S[9]; yyyymmdd[8]=0x00; if (atoi(yyyymmdd)<=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161259/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161259/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[20]; scanf("%s", s); if (strcmp(s, "2019/04/30") <= 0) printf("Heisei\n"); else printf("TBD\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161301/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161301/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 i; long long int n, out, s; scanf("%lld", &n); s = sqrt(n); for(i=s; i>0; i--){ if(n%i==0){ out = (n/i) + i - 2; printf("%lld", out); return 0; } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161352/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161352/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 <assert.h> #include <stdlib.h> #include <string.h> #include <math.h> #define NDEBUG #ifdef NDEBUG #define DEBUG_PRINT(fmt, ...) ((void)0) #else #define DEBUG_PRINT(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__) #endif #define ASSERT_RANGE(min,x,max) assert(((x)>=(min)) && ((x)<=(max))) #d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161396/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161396/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 <math.h> #define min(p,q)((p)<(q)?(p):(q)) int main(){ long long N; scanf("%lld",&N); long long n=sqrt(N); if((n+1)*(n+1)<=N)n++; long long ans=N; for(int i=1;i<=n;i++)if(N%i==0){ ans=min(ans,i+N/i-2); } printf("%lld\n",ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161439/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161439/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 n; scanf("%lld",&n); long long ans=1000100010001001; long long num1,num2; for(long long i=1;i*i<=n+1;i++){ if(n%i==0&&llabs(n/i-i)<ans){ ans=llabs(n/i-i); num1=i; num2=n/i; } } pr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161482/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161482/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, div; scanf("%lld", &n); for(long long i = 1; i * i <= n; i++){ if(n % i == 0) div = i; } n /= div; printf("%lld\n", n + div - 2); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161525/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161525/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> #define MAX 1000 int main(void) { int i; while (1) { int num_students; scanf("%d", &num_students); if (num_students == 0) { break; } int points[MAX]; for (i = 0; i < num_students; i++) { scanf(" %d"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161576/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161576/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 <string.h> #include <stdlib.h> double stddev(const int a[],int n){ double mean=0,disp=0; int i; for(i=0;i<n;i++){ mean+=a[i]; } mean/=n; for(i=0;i<n;i++){ disp+=pow(a[i]-mean,2); } disp/=n; return sqrt(disp); } int main(void){ int i,n,a[1000]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161619/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161619/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; long long int n; scanf("%d", &t); while(t--){ scanf("%lld", &n); if(n%3==0) printf("%lld %lld\n", n/3, n/3); else if(n%3==1) printf("%lld %lld\n", (n/3)+1, n/3); else if(n%3==2) printf("%lld %lld\n", n/3, (n/...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16167/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16167/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<math.h> int main() { int t; scanf("%d",&t); while(t--) { long long int n,i,c1=0,c2=0; scanf("%lld",&n); c1 = n/3; if((n-c1)%2!=0) { c1++; } int diff = n - c1; c2 = diff/2; printf("%lld %lld\n"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16172/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16172/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 <string.h> int main() { int a,b,c,d; while(~scanf("%d",&a)) { if(a==1) printf("Hello World\n"); else { scanf("%d %d",&b,&c); printf("%d\n",b+c); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161770/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161770/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; scanf("%d",&n); if (n == 1) { printf("Hello World"); } else { scanf("%d %d",&a,&b); printf("%d",a + b); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161813/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161813/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; scanf("%d", &N); if(N == 1)printf("%s\n", "Hello World"); if(N == 2){ int A, B; scanf("%d\n%d", &A, &B); printf("%d\n", A+B); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161857/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161857/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 s1[200000],s2[200000]; int one[200001],zero[200001]; int len1,len2,i,xx; long long sum=0; scanf("%s",s1);len1=strlen(s1); scanf("%s",s2);len2=strlen(s2); xx=len2-len1+1; one[0]=0;zero[0]=0; for(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16190/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16190/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 n, a, b; scanf("%d", &n); if(n == 1){ printf("Hello World"); } else{ scanf("%d", &a); scanf("%d", &b); printf("%d", a+b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161943/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161943/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,a,b; scanf("%d",&n); if(n==1){ printf("Hello World\n"); } else{ scanf("%d %d",&a,&b); printf("%d\n",a+b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161987/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161987/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; scanf("%d",&N); if(N==1) printf("Hello World"); else{ scanf("%d%d",&A,&B); A+=B; printf("%d",A); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162036/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162036/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,s; scanf("%d %d",&n,&s); int f[n],t[n],i; for(i=0;i<n;i++) { scanf("%d %d",&f[i],&t[i]); } int a =s-f[n-1]; for(i=n-1;i!=0;i--) { if(a>=t[i]) { a=a+f[i]-f[i-1]; } else { a=t[i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16208/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16208/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,A,B; scanf("%d",&N); scanf("%d",&A); scanf("%d",&B); if(N==1) printf("Hello World"); else printf("%d",A+B); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162122/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162122/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> typedef long long ll; #define rep(i,n) for(int i=0;i<(int)(n);i++) typedef struct{int first;int second;}P; int upcmpllp(const void *a, const void *b){ if(((P*)a)->first!=((P*)b)->first)return(((P*)a)->first>((P*)b)->first?1:-1); else return(((P*)a)->second==((P*)b)->secon...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162166/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162166/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.P = type { i32, i32...
#include <stdio.h> int N, X, A[200000]; int main() { scanf("%d", &N); for(int i=0;i<N;++i) scanf("%d",A+i), X ^= A[i]; for(int i=0;i<N;++i) printf("%d ", A[i] ^ X); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162223/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162223/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> long long x[900000][2]; int l(long long x1, long long x2, long long y1, long long y2){ if(x1 == y1){ return x2 < y2; }else{ return x1 < y1; } } void func(long long s, long long t){ long l...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162274/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162274/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" @x = dso_local local_unname...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> #define ll long long int #define lim 100010 ll MIN(ll x,ll y){return x<y?x:y;} ll MAX(ll x,ll y){return x<y?y:x;} int main(void){ ll a,b,c; scanf("%lld%lld%lld",&a,&b,&c); ll m=MIN(a,MIN(b,c)); ll l=MAX(a,MAX(b,c)); ll n=(a+b+c)-m-l;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162324/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162324/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 MIN(long long a,long long b){return a<b?a:b;} int main(){ long long a,b,c; scanf("%lld %lld %lld",&a,&b,&c); printf("%lld\n",(a%2)*(b%2)*(c%2)?MIN(a*b,MIN(b*c,a*c)):0); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162368/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162368/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 H,W; int i,j; scanf("%d %d",&H,&W); while((H!=0)||(W!=0)){ for(i=0;i<H;i++){ for(j=0;j<W;j++){ if(i==0||i==H-1||j==0||j==W-1)printf("#"); else printf("."); } printf("\n"); } printf("\n"); scanf("%d %d",&H,&W); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162418/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162418/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 H,W,a,b; while(1){ scanf("%d %d",&H,&W); if(H==0 && W==0) break; if(H>=3&&H<=300&&W>=3&&W<=300){ for(a=1;a<=H;a++){ for(b=1;b<=W;b++){ if(a==1||a==H||b==1||b==W) printf("#"); else printf(".");} putchar('\n'); }} putchar('\n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162469/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162469/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[100][100]={0},b,c,i,j,k,y,z; for(;;) { scanf("%d %d",&b,&c); y=b-1; z=c-1; if(b==0||c==0) break; for(i=0;i<b;i++) { for(j=0;j<c;j++) { a[i][j]; if(i==0 || j==0 || i==b-1 || j==c-1) printf...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162511/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162511/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 H,W,i,j; scanf("%d %d",&H,&W); while(H!=0 || W!=0){ for(i=0;i<H;i++){ for(j=0;j<W;j++){ if(i==0||j==0||i==H-1||j==W-1){ printf("#"); }else{ printf("."); } } printf("\n"); } scanf("%d %d",&H,&W); printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162555/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162555/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,i,j; scanf("%d %d",&a ,&b); while(a != 0 || b != 0){ for(i = 0; i < a; i++){ for(j = 0;j < b; j++){ if(i == 0 || j == 0 || j == (b -1) || i == (a -1) ){ printf("#"); }else{ printf("."); } } printf("\n"); } scanf("%d %d",&a ,&b); prin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162599/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162599/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,H,W; for(;;){ scanf("%d%d",&H,&W); if(H==0,W==0)break; for(j=0;j<H;j++){ for(i=0;i<W;i++){ if(i==0||j==0||j==(H-1)||i==(W-1))printf("#"); else printf("."); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162656/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162656/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(void){ int i, j, k = 3, n, s, sosu[5140]; int max, min, mid; sosu[0] = 1; sosu[1] = 2; sosu[2] = 3; for(i = 5; i <= 50050; i += 2){ s = 0; for(j = 2; sosu[j] <= sqrt((double)i); j++){ if(i % sosu[j] == 0){ s++; break; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162757/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162757/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...