Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> #include <ctype.h> #include <stdlib.h> int main() { int a[101][101], b[101][101]; long long c[101][101], s; int i, j, k; int n, m, l; scanf("%d%d%d", &n, &m, &l); for (i = 0; i < n; i++) { for (j = 0; j < m; j++) scanf("%d", &a[i][j]); } for (i = 0; i < m; i++) { for (j = 0; j < l; j++)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156359/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156359/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 s[100][100],t[100][100],n,m,l,a,b,c; long u[100][100]={{0}}; scanf("%d %d %d",&n,&m,&l); for(a=1;a<=n;a++){ for(b=1;b<=m;b++){ scanf("%d",&s[a-1][b-1]); }; }; for(a=1;a<=m;a++){ for(b=1;b<=l;b++){ scanf("%d",...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156401/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156401/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include "stdio.h" int main(int argc, char const *argv[]) { int i,j,k,n,m,l; long num1[100][100],num2[100][100],num3[100][100]; scanf("%d",&n); scanf("%d",&m); scanf("%d",&l); for(i=0;i<n;i++){ for(j=0;j<m;j++){ scanf("%ld",&num1[i][j]); } } for(i=0;i<m;i++){ for(j=0;j<l;j++){ scanf("%ld",&num2[i][j])...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156445/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156445/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; long long a, b; scanf("%d %lld %lld", &n, &a, &b); long long x[100000]; for(int i = 0; i < n; i++) scanf("%lld", &x[i]); long long ans = 0; for(int i = 1; i < n; i++){ if(a * (x[i] - x[i - 1]) > b) ans += b; else ans += a * (x[i] - x[i -...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156496/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156496/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,D,res=1,i; scanf("%d%d",&D,&N); N+=N/100; for(i=0;i<D;i++){ res*=100; } res*=N; printf("%d",res); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156539/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156539/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int a,b,c=1; scanf("%d %d",&a,&b); for(int i=0; i<a; i++){ c*=100; } if(b!=100){ printf("%d",c*b); }else{ printf("%d",c*101); } return 0;}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156582/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156582/source.c" target datalayout = "e-m:e-p270:32:32-p271: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, N; scanf("%d%d", &D, &N); if(D==0) if(N!=100) printf("%d", N); else printf("101"); else if(D==1) if(N!=100) printf("%d", N*100); else printf("10100"); else if(N!=100) printf("%d", N*10000); else printf("1010000"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156625/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156625/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,N; scanf("%d%d",&D,&N); if(N==100){ N++; } switch(D){ case 0: printf("%d",N); break; case 1: printf("%d",N*100); break...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156669/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156669/source.c" target datalayout = "e-m:e-p270:32:32-p271: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, n; scanf("%d %d", &d, &n); if (d == 2) { if (n == 100) { printf("1010000\n"); }else { printf("%d\n", n * 10000); } }else if (d == 1) { if (n == 100) { printf("10100\n"); }else { printf("%d\n", n * 100); } }else { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156711/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156711/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(int argc, char const *argv[]) { int D,N; scanf("%d %d",&D,&N ); if(D==0){ if(N<100) printf("%d",N ); else if(N==100) printf("%d",N+1 ); } else if(D==1){ if(N<100) printf("%d",N*100 ); else if(N==100) printf("%d",N*100+100 ); return 0; } else if(D==2){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156755/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156755/source.c" target datalayout = "e-m:e-p270:32:32-p271: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, n; scanf("%d %d", &d, &n); if(d==0&&n==100) printf("101"); else if(d==0) printf("%d", n); if(d==1&&n==100) printf("10100"); else if(d==1) printf("%d", 100*n); if(d==2&&n==100) printf("1010000"); else if(d==2) printf("%d", 10000*n); r...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156805/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156805/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 WIDTH 3001 #define HEIGHT 51 int dp[HEIGHT * WIDTH]; int main(void) { int i, j, k; int n, m, s; while(scanf("%d%d%d", &n, &m, &s), n){ n *= n; dp[0] = 1; for(i=1; i<WIDTH*HEIGHT; ++i) dp[i] = 0; for(i=1; i<=m; ++i){ for(j=n; j>=0; --j){ for(k=s; k>...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156849/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156849/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; int cup[4] = {1}; char c[2]; while (scanf("%c,%c", &c[0], &c[1]) != EOF){ if (c[0] =='A' && c[1] =='B' || c[0] =='B' && c[1] =='A'){ cup[3] = cup[0]; cup[0] = cup[1]; cup[1] = cup[3]; } else if (c[0] =='A' && c[1] =='C' || c[0] =='C' && c[1] =='A'){ cu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_156892/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_156892/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> int main() { long long x,y,x1,y1,sum=0,g; scanf("%I64d%I64d%I64d%I64d",&x,&y,&x1,&y1); g=abs(abs(x-x1)-abs(y-y1)); if(abs(x-x1)>abs(y-y1)) sum=g+abs(y-y1); else sum=g+abs(x-x1); printf("%I64d",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15695/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15695/source.c" target datalayout = "e-m:e-p270:32:32-p271: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(void){ char ball='A',c1,c2; while(scanf(" %c,%c",&c1,&c2)!=EOF){ if(c1==ball)ball=c2; else if(c2==ball)ball=c1; } printf("%c\n",ball); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157006/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157006/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #define N 3000 double dp[N][N];//i枚目まで見てj枚表の確立 double coin[N]; int main(void){ int i; int j; int n; double ans =0; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%lf",&coin[i]); } dp[0][0]=1.0; for(i=0;i<n;i++){ dp[i+1][0]=dp[i][0]*(1.0-coin[i+1]); } for(i=0;i<n;i++){ for(j=0;j<n;j++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157079/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157079/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #include <limits.h> #include <stdbool.h> #define rep(i, n) for(int i=0; i<(n); ++i) #define max 200001 //qsort(str, n, sizeof(int), up_comp); int up_comp(const void *a, const void *b){return *(int*)a - *(int*)b;} int down_comp(const void *a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157121/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157121/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 n; scanf("%c",&n); if(n=='A') printf("T"); else if(n=='T') printf("A"); else if(n=='G') printf("C"); else if(n=='C') printf("G"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157165/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157165/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 b; scanf("%s",&b); if(b=='A') printf("T"); if(b=='T') printf("A"); if(b=='C') printf("G"); if(b=='G') printf("C"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157208/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157208/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 buff[256]; scanf("%s",buff); if(!strcmp(buff, "A")) printf("T"); else if(!strcmp(buff, "T")) printf("A"); else if(!strcmp(buff, "G")) printf("C"); els...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157266/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157266/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 base[101]; scanf("%s",base); if (base[0] == 'A'){ printf("T"); }else if(base[0] =='T'){ printf("A"); }else if(base[0] =='G'){ printf("C"); }else{ printf("G"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157316/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157316/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ll long long int int main() { ll a,b,i,j,max=-1,t,c,d; scanf("%lld%lld",&a,&b); scanf("%lld%lld",&c,&d); t=abs(a-c); j=llabs(b-d); if(t>j) max=t; else max=j; printf("%lld\n",max); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15736/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15736/source.c" target datalayout = "e-m:e-p270:32:32-p271: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<string.h> int main(){ char s[1]; scanf("%s", s); if(strcmp(s, "A") == 0){ printf("T\n"); }else if(strcmp(s, "T") == 0){ printf("A\n"); }else if(strcmp(s, "G") == 0){ printf("C\n"); }else if(strcmp(s, "C") == 0){ printf("G\n"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157402/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157402/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 c,a; scanf("%c",&c); switch (c) { case 'A': a = 'T'; break; case 'T': a = 'A'; break; case 'G': a = 'C'; break; case 'C': a = 'G'; break...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157453/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157453/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 b; scanf("%c",&b); if(b == 'A'){ printf("T\n"); } else if(b == 'T'){ printf("A\n"); } else if(b == 'C'){ printf("G\n"); } else if(b == 'G'){ printf("C\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157497/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157497/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; scanf("%c",&S); if(S == 'A') printf("T\n"); else if(S == 'C') printf("G\n"); else if(S == 'G') printf("C\n"); else if(S == 'T') printf("A\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157547/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157547/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 N, K; int A[271828]; int main(void) { int i; int ng = 0, ok = 1000000000; if (scanf("%d%d", &N, &K) != 2) return 1; for (i = 0; i < N; i++) { if (scanf("%d", &A[i]) != 1) return 1; } while (ng + 1 < ok) { int m = ng + (ok - ng) / 2; int count = 0; for (i = 0; i < N; i++) { coun...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157590/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157590/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ll long long #define rep(i,n) for(ll i=0;i<(n);i++) #define max(p,q) ((p)>(q)?(p):(q)) #define min(p,q) ((p)<(q)?(p):(q)) #define chmax(a,b) ((a)=(a)>(b)?(a):(b)) #define chmin(a,b) ((a)=(a)<(b)?(a):(b)) #define abs(p) ((p)>=(0)?(p):(-...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157648/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157648/source.c" target datalayout = "e-m:e-p270:32:32-p271: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...
/* cat <<EOF >mistaken-paste */ #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #define BIG 2000000007 #define MOD 1000000007 typedef uint64_t ull; typedef int64_t sll; #define N_MAX...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157705/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157705/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.hw = type { i32, i3...
#pragma warning(disable:4996) #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <float.h> #pragma region 定義 #define i_cin(X) scanf("%d", &X) #define i_cin2(X,Y) scanf("%d %d",&X,&Y) #define i_cin4(X,Y,Z,W) scanf("%d %d %d %d",&X,&Y,&Z,&W) #define i_cin3(X,Y,Z) scanf("%d %d %d",&X,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157763/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157763/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 <float.h> #include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> // 内部定数 #define D_MOD 1000000007 // 除数(10の9乗+7) #define D_DIGIT_MAX 100005 // 最大桁数 // 内部変数 static FILE *szpFpI; // 入力 static char sc1Val[D_DIGIT_MAX]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157813/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157813/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 r, c, p; int main() { while((c = getchar_unlocked()) > 10) { if (c == p) { p = 1; } else { r += 1; p = p == 1 ? 0 : c; } } printf("%d\n", r); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157857/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157857/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct._IO_FILE = type { i...
#include <stdio.h> int main(void){ int c[5][5]; for(int i=0; i<3; i++)scanf("%d %d %d", &c[i][0], &c[i][1], &c[i][2]); for(int i=1; i<3; i++){ for(int j=1; j<3; j++){ if(c[i][0]-c[i-1][0]!=c[i][j]-c[i-1][j]){ printf("No\n"); return 0; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157914/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157914/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 BUF_SIZE 30 int main(void) { FILE *fp = stdin; char line[BUF_SIZE]; int i, j; int a[3][3]; int min = 101; int argmin_x, argmin_y; for(i = 0; i < 3; i++) { if(!fgets(line, BUF_SIZE, fp)) return 0; sscanf(line, "%d %d %d", &a[i][0], &a[i][1], &a[i][2]); for(j = 0; j ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_157958/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_157958/source.c" target datalayout = "e-m:e-p270: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> int main() { int a[3][3],sum=0,sum1,sum2,i,j; for(i=0;i<3;i++) for(j=0;j<3;j++) { scanf("%d",&a[i][j]); sum+=a[i][j]; } sum1=a[0][0]+a[2][1]+a[1][2]; sum2=a[2][2]+a[0][1]+a[1][0]; if(a[0][0]+a[2][2]==a[0][2]+a[2][0]&&sum1==sum2&&sum==...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158021/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158021/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 debug system("PAUSE") void sort(int [], int); int main() { int a[3][3]; int i, j; for (i = 0; i < 3; i++) for (j = 0; j < 3; j++) scanf("%d", &a[i][j]); if (a[1][0] - a[0][0] == a[1][1] - a[0][1] && a[1][1] - a[0][1] == a[1][2] - a[0][...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158065/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158065/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #include<stdbool.h> #include<assert.h> #include<ctype.h> typedef long long ll; typedef long double ld; #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 rrep(i,l,r)for(ll i=(l);i>=(r);i--) #define IN...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158108/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158108/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// 三井住友信託銀行プログラミングコンテスト2019-D // 2019.12.1 bal4u #include <stdio.h> int N; char S[30005]; char a[1000]; int n[10], n10[100]; int main() { int i, j, x, ans; scanf("%d%s", &N, S+1); for (i = 1; i <= N; ++i) { x = S[i] & 0xf; if (!n[x]) n[x] = i; for (j = 0; j < 10; ++j) if (n[j] > 0 && n[j] < i && !n10[10*j...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158151/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158151/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { long int inputN, answer = 0; scanf("%ld", &inputN); for (int count = 1; count < inputN; count++) { answer += count; } printf("%ld", answer); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158201/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158201/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { long int n; scanf("%ld",&n); printf("%ld",n*(n-1)/2); // your code goes here return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158245/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158245/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; long ans; scanf("%ld",&n); ans=(n*(n-1))/2; printf("%ld",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158289/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158289/source.c" target datalayout = "e-m:e-p270:32:32-p271: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); long long int sum = 0; for(int i=0;i<N;i++){ sum += i; } printf("%lld",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158339/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158339/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 MAXN 110 int main(){ int n, i, j, k; int a[MAXN]; scanf("%d", &n ); for( i = 1; i <= n; i++ ) scanf("%d", &a[i] ); for( i = 1; i <= n; i++ ){ for( j = 1; j <= n; j++ ){ if( i == j ) continue; for( k = 1; k <= n; k++ ){ if( j == k ) continue; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15839/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15839/source.c" target datalayout = "e-m:e-p270:32:32-p271: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;scanf("%d",&t); while(t--){ int n;scanf("%d",&n); for(int i=4;i-1<=n;i <<= 1){ if(n%(i-1)==0){ printf("%d\n",n/(i-1)); break; } } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15844/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15844/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 int long long typedef struct { int t; int d; }pair; signed compair(const void *a, const void *b){ pair pa = *(pair *)a, pb = *(pair *)b; int sub = pa.d - pb.d; if(sub < 0){ return 1; } else if(sub == 0){ return 0; } else{ return -1; } } int max(int a, in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158483/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158483/source.c" target datalayout = "e-m:e-p270: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.pair = type { i64, ...
#include<stdio.h> int main(void){ long long a, b, c; scanf("%lld %lld %lld", &a, &b, &c); if(c-a-b>=0 && 4*a*b<(c-a-b)*(c-a-b)) puts("Yes"); else puts("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158533/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158533/source.c" target datalayout = "e-m:e-p270:32:32-p271: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(){ long int a,b,c,tmp1,tmp2; scanf("%ld %ld %ld",&a,&b,&c); tmp1 = 4*a*b; c -= a+b; if(c < 0) c = 0; tmp2 = c*c; if(tmp1 < tmp2) printf("Yes\n"); else printf("No\n"); // printf("%Lf ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158577/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158577/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 q; scanf("%d", &q); while(q--){ int n, m = 4, i = 2; scanf("%d", &n); while(n % (m - 1) != 0){ m *= 2; i++; } printf("%d\n", n / (m - 1)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15862/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15862/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...
//set many funcs template //Ver.20190820 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #include<assert.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158663/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158663/source.c" target datalayout = "e-m:e-p270: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.sd = type { i32, i3...
#include <stdio.h> #include <string.h> int main(void){ char a[102],b[102]; int A,B,i; scanf("%s\n%s",a,b); A=strlen(a); B=strlen(b); if(A>B) printf("GREATER"); else if (A<B) printf("LESS"); else{ for(i=0;i<=A-1;i++){ if(a[i]>b[i]){ printf("GREATER"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158706/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158706/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,l,n,i,j,k; long long sum1,sum2; scanf("%d",&t); for(l=1;l<=t;l++){ scanf("%d",&n); long long a[n]; if(n%4==0){ printf("YES\n"); sum1=0; sum2=0; k=2; j=1; for(i=0;i<(n/2);i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15875/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15875/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 <string.h> int main() { char A[110], B[110]; int Alength, Blength; int i; scanf("%s %s", A, B); Alength = strlen(A); Blength = strlen(B); if(Alength < Blength) { printf("LESS\n"); return 0; } else if(Alength > Blength) { printf("GREATER\n"); return 0; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158807/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158807/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> int in(void){ int i;scanf("%d",&i); return i; } long long llin(void){ long long i;scanf("%lld",&i); return i; } void print(int a){ printf("%d\n",a); } void llprint(long...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158865/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158865/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 = 0; double y = 0; int t_now = 90; int len; int theta; while (1) { scanf("%d,%d", &len, &theta); if (len == 0 && theta == 0) break; x += len * cos(t_now * M_PI / 180); y += len * sin(t_now * M_PI / 180); t_now += theta * -1; } printf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158922/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158922/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 d,t; double x=0.0,y=0.0; int ang=90.0; while(1) { scanf("%d,%d",&d,&t); if(d==0 && t==0) break; x+=(double)d*cos((double)ang*M_PI/180.0); y+=(double)d*sin((double)ang*M_PI/180.0); ang-=(double)t; } printf("%d\n%d\n",(i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_158988/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_158988/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 DEBUG int main(void) { FILE* fp; #ifdef DEBUG fp=fopen("input.txt","r"); #else fp=stdin; #endif double x=0,y=0,theta=M_PI/2.0; while(1){ //input int hosu,degree; fscanf(fp,"%d,%d\n",&hosu,&degree); if(hosu==0 && degr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159037/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159037/source.c" target datalayout = "e-m:e-p270: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 PI 3.14159 int main() { int d,r,t=90; double x = 0,y = 0; do{ scanf("%d%*c%d",&d,&r); x+=d*cos(t/180.0*PI); y+=d*sin(t/180.0*PI); t-=r; }while(d||r); printf("%d\n%d\n",(int)x,(int)y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159101/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159101/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 temp; temp = x; x = y; y = temp; return x, y; } int main(void) { int x, y, r; scanf("%d %d", &x, &y); if ( x < y) { swap(x, y); } while ( y > 0) { r = x % y; x = y; y = r; } printf("%d\n", x...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159145/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159145/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 int t, i, j, p,x; scanf("%lli\n", &t) ; for(i=0;i<t;i++) { scanf("%lli", &x) ; p=3; for(j=2;x%p!=0;j++) p+=pow(2,j); printf("%lli\n",x/p); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_15921/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_15921/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x, int y){ int r; while(1){ r=x%y; if(r==0)break; x=y; y=r; } return y; } int main(){ int x,y,m; scanf("%d %d",&x,&y); m=gcd(x,y); printf("%d\n",m); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159268/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159268/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #define MAX 1000000000 int gcd(int x,int y){ int r; int temp; if(x < y){ temp = x; x = y; y = temp; } while(y > 0){ r = x%y; x = y; y = r; } return x; } int main(){ int x; int y; scanf("%d",&x); scanf("%d",&y); if(x < 1 || x > MAX || y < 1 || y...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159310/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159310/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,r; scanf("%d%d",&x,&y); 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_159354/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159354/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,r; scanf("%d%d",&x,&y); if(y<x){ while(y>0){ r=x%y; x=y; y=r; } } if(x<y){ while(x>0){ r=y%x; y=x; x=r; } } if(y<x) printf("%d\n",x); else printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159398/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159398/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,temp,r; 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_159448/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159448/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 a, int b) { while (b > 0) { int n; n = a % b; a = b; b = n; } return a; } int main() { int a, b, c; scanf ("%d %d", &a, &b); c = gcd(a, b); printf("%d\n", c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159491/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159491/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 Euclidean(int a, int b); int main(void){ int a, b, gcd; scanf("%d%d", &a, &b); gcd = Euclidean(a, b); printf("%d\n", gcd); return 0; } int Euclidean(int a, int b){ int r; if(a < b){ r = a; a = b; b = r; } while(b != 0){ r = a % b; a = b; b = r; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159534/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159534/source.c" target datalayout = "e-m:e-p270:32:32-p271: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, temp; scanf("%d%d", &a, &b); if(a == b){ printf("%d\n", a); return 0; } if(a<b){ temp = a; a = b; b = temp; } temp = a%b; while(1){ a = b; b = temp; temp = a%b; if(temp == 0) break; } printf("%d\n", b); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159578/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159578/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,tmp; scanf("%d%d",&x,&y); if(x<y){ tmp=x; x=y; y=tmp; } amari=x%y; while(amari!=0){ x=y; y=amari; amari=x%y; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159620/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159620/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int a,b,c,i,num; scanf("%d %d",&a,&b); c=b; for(i=1;i<=c;i++){ num=b; b=a%b; a=num; if(b==0)break; } printf("%d\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159664/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159664/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 temp; temp = *x; *x = *y; *y = temp; } int main(void) { int x,y; scanf("%d %d",&x,&y); if(x<y) swap(&x, &y); while (y) { x = x % y; swap(&x, &y); } printf("%d\n",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159714/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159714/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a,b,c,r; scanf("%d %d", &a, &b); if(a < b) { c = b; b = a; a = c; } while(b > 0) { r = a % b; a = b; b = r; } printf("%d\n", a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159758/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159758/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,z,r; scanf("%d%d",&x,&y); if(x<y){ z=x; x=y; y=z; } r=x%y; while(r!=0){ x=y; y=r; r=x%y; if(r==0) break; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159800/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159800/source.c" target datalayout = "e-m:e-p270:32:32-p271: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) { return y ? gcd(y, x % y) : x; } int main() { int a, b; scanf("%d %d", &a, &b); printf("%d\n", gcd(a, b)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159844/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159844/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 a,int b); int main(int argc, const char * argv[]) { int a,b; scanf("%d %d",&a,&b); printf("%d\n",gcd(a,b)); } int gcd(int a,int b){ int r; while((r = a % b) != 0){ a = b; b = r; } return b; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159888/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159888/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int a, b, c, work; a=b=c=work=0; scanf("%d%d", &a, &b); if(a<b){ work=a; a=b; b=work; } c=a%b; while(c!=0){ a=b; b=c; c=a%b; } printf("%d\n", b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159930/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159930/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,i,y,c,d; scanf("%d%d",&x,&y); while(1){ d=x%y; if(d==0)break; x=y; y=d; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_159974/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_159974/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 main(int argc, char** argv) { int a; int b; scanf("%d", &a); scanf("%d", &b); printf("%d\n", gcd(a,b)); return 0; } int gcd(int a,int b){ if(a%b==0) return b; return gcd(b,a%b); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160022/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160022/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,i,n; scanf("%d %d",&x,&y); if(x<y){ i = x; x = y; y = i; } n = x % y; while(n != 0){ x = y; y = n; n = x % y; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160066/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160066/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x,y,i,v; scanf("%d%d",&x,&y); if(x < 1 || y < 1 || x > 1000000000 || y > 1000000000){ printf("Please type 1 to 1000000000."); exit(1); } if(x > y){ v = x; x = y; y = v; } for(i=1; i<=x/2;i++){ if(x%i == 0 && y%i ==...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160109/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160109/source.c" target datalayout = "e-m:e-p270:32:32-p271: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[2],sub,big,small; scanf(" %d %d",&n[0],&n[1]); if(n[1] < n[0]){ big = n[0]; small = n[1]; } else{ big = n[1]; small = n[0]; } while(1){ sub = small; small = big % small; big = sub; //printf("big = %d,small = %d\n",big,small); if...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160152/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160152/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> int main(){ int a,b,c; scanf("%d %d",&a,&b); if(a<0||a>1000000000 && b<0||b>1000000000){ printf("error"); return 0; } //swap if(a<b){ c=a; a=b; b=c; } while(b>0){ c=a%b; a=b; b=c; } printf("%d\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160217/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160217/source.c" target datalayout = "e-m:e-p270:32:32-p271: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); int r; int cp; while(1){ if(x<y){ cp=x; x=y; y=cp; } if(y==0){ break; } x=x%y; } printf("%d\n",x); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160275/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160275/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,b; scanf("%d %d",&a,&b); int temp; while(b!=0){ temp = b; b = a%b; a = temp; } printf("%d\n",temp); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160318/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160318/source.c" target datalayout = "e-m:e-p270:32:32-p271: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, z; scanf("%d%d",&x,&y); if(x < y){ z = x; x = y; y = z; } for(z = x % y ; z != 0 ; z = x % y){ x = y; y = z; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160361/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160361/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int a,b,c,rem; scanf("%d%d",&a,&b); if(a<b) { c = a; a = b; b = c; } rem = a % b; while(rem != 0) { a = b; b = rem; rem = a % b; } printf("%d\n",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160411/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160411/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #define N int main() { int a,b,c,x,y; scanf("%d%d",&a,&b); if(a>=b) { x = a; y = b; } else { x = b; y = a; } while(y!=0) { c = x%y; x = y; y = c; } printf("%d\n",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160455/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160455/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 calc(int, int); int main(){ int x,y; scanf("%d %d",&x,&y); calc(x,y); return 0; } void calc(int x, int y){ int z; if(y > x){ z=x; x=y; y=z; } while(1){ z = x%y; x = y; y = z; if(z == 0)break; } printf("%d\n",x); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160499/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160499/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,int); int main(){ int x,y,z; scanf("%d %d",&x,&y); if(x<y){ z=y; y=x; x=z; } gcd(x,y); return 0; } void gcd(int x,int y){ int z=y; while(z!=0){ y=z; z=x%y; x=y; } printf("%d\n",y); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160541/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160541/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; scanf("%d",&t); while(t--){ int s; scanf("%d",&s); int n = 1; while(s > n*n){ n = n + 1; } printf("%d\n",n); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1606/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1606/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 a,b,c; scanf("%d %d",&a,&b); while(a != b){ if(a > b){ c = a - b; a = b; b = c; }else{ c = b - a; b = a; a = c; } } printf("%d\n",a); return 0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160642/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160642/source.c" target datalayout = "e-m:e-p270:32:32-p271: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...
// Greatest Common Divisor(最大公約数) #include <stdio.h> int main(void) { int x, y, tmp; scanf("%d %d", &x, &y); if(x < y){ tmp = x; x = y; y = tmp; } int 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_160686/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160686/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,r; scanf("%d %d",&x,&y); if(x < y){ r = x; x = y; y = r; } 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_160729/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160729/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,z,temp; scanf("%d%d",&x,&y); if(x<y){ temp = x; x = y; y = temp; } z = x%y; while(z!=0){ x = y; y = z; z = x%y; } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160772/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160772/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,ns,nb,d; scanf("%d%d",&x,&y); if(x<y){ ns=x; nb=y; } else if(y<x){ ns=y; nb=x; } while(1){ d=nb%ns; if(d==0) break; nb=ns; ns=d; } printf("%d\n",ns); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160815/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160815/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,mod; scanf("%d %d",&x,&y); while(1){ mod=x%y; if(mod==0){ break; }else{ x=y; y=mod; } } printf("%d\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160859/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160859/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 a,int b); int main(int argc, const char * argv[]) { int a,b; scanf("%d %d",&a,&b); printf("%d\n",gcd(a,b)); } int gcd(int a,int b){ int r; while((r = a % b) != 0){ a = b; b = r; } return b; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160909/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160909/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 number; int human,fish; int i; int max = -1; int x = 0; scanf("%d",&number); for(i = 0;i < number;i++){ scanf("%d %d",&human,&fish); if(fish > max){ max = fish; x = human; } if((max == fish) && (x > human)){ x = human; } } printf("%d %d\n",x,max); retur...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_160952/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_160952/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 b,c,d=-1,e=0; int a,i; scanf("%d",&a); for(i=0;i<a;i++){ scanf("%d %d",&b,&c); if(c>d){ d=c; e=b; }else if(c==d&&b<e)e=b; } printf("%d %d\n",e,d); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161001/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161001/source.c" target datalayout = "e-m:e-p270:32:32-p271: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[15]; scanf("%s", S); if(S[5]=='0' && S[6]<='4' &&S[6] >='1'){ printf("Heisei\n"); }else{ printf("TBD\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161052/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161052/source.c" target datalayout = "e-m:e-p270:32:32-p271: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[15]; scanf("%s", S); puts((S[5] == '1' || S[6] >= '5') ? "TBD" : "Heisei"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161096/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161096/source.c" target datalayout = "e-m:e-p270:32:32-p271: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...