Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> int main(void){ int n,i,x; scanf("%d",&n); for(i=1;i<=n;i++){ x=i; if(x%3==0){ printf(" %d",i); continue; } do{ if(x%10==3){ printf(" %d",i); break; } if((x/=10)==0) break; }while(x!=0); } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_229994/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_229994/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int n, i; scanf("%d\n", &n); i = 1; while(1) { if((i / 10) % 10 == 3 || (i / 100) % 10 == 3 || (i / 1000) % 10 == 3) { printf(" %d", i); } else if((i - 3) % 10 == 0) { printf(" %d", i); } else if(i % 3 == 0) { prin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_230042/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_230042/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,j; scanf("%d",&n); for(i = 1;i<=n;i++){ if(i % 3 == 0){ printf(" %d",i); } else { for(j = i;j>0;j /= 10){ if(j % 10 == 3){ printf(" %d",i); break; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_230143/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_230143/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, i, x, include3 = 0; scanf("%d", &n); i = 1; while (1) { if (!include3) { // check num x = i; if (x % 3 == 0) { printf(" %d", i); if (++i <= n) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_230187/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_230187/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int i=1; int x; scanf("%d", &n); do { int x = i; if (x % 3 == 0) { printf(" %d", i); continue; } do{ if (x % 10 == 3) { printf(" %d", i); break; } else { x /= 10; } } while (x); } while (++i <= n); pr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_230237/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_230237/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,num; scanf("%d",&num); for(i=1;i<=num;i++){ if(i%10==3){ printf(" %d",i); } else if(i%3==0){ if(i==num){ printf(" %d",i); } else printf(" %d",i); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_230280/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_230280/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 TRUE 1 #define FALSE 0 int has3(int x) { while(x) { if(x%10 ==3) return TRUE; x /= 10; } return FALSE; } void call(int n) { int x; for(x=1;x<=n;x++) { if(x%3==0 || has3(x)) { printf(" %d",x); } } printf("\n"); } int main(void) { int n; scanf("%d",&n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_230323/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_230323/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, n; scanf("%d", &n); for (i = 1; i <= n; i++) { int x = i; if (x % 3 == 0) { printf(" %d", i); } else { while (x) { if (x % 10 == 3) { printf(" %d", i); break; } x /= 10; } } } printf("\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_230381/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_230381/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ; scanf("%d",&n) ; int x ; int y ; for( x=1 ; x<=n ; x++ ){ if( x % 3 == 0){ printf(" %d", x) ; }else{ y = x; while( y != 0 ){ if( y % 10 == 3){ printf(" %d",x) ; y = 0 ; }else{ y = y / 10 ; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_230475/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_230475/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int jyuu; int hyaku; int sen; scanf("%d",&x); for(int i=1;i<=x;i++){ sen=i/1000; hyaku=(i-sen*1000)/100; jyuu=((i-sen*1000)-hyaku*100)/10; if(i%3==0||i%10==3||i%100==3||i%1000==3){ printf(" %d",i);...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_230525/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_230525/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,x; scanf("%d",&n); for(i=1;i<=n;i++){ x=i; if ( x % 3 == 0 ){ printf(" %d",i); }else{ do{ if ( x % 10 == 3 ){ printf(" %d",i); x=0; } x /= 10; }while( x ); } } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_230569/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_230569/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int A,B; scanf("%d%d",&A,&B); if(B%A==0) printf("%d\n",A+B); else printf("%d\n",B-A); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_230619/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_230619/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int A, B; scanf("%d%d",&A, &B); if(B%A==0) { printf("%d",A+B); } else { printf("%d",B-A); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_230662/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_230662/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int a,b; scanf("%d %d",&a,&b); if(b%a==0){printf("%d",a+b);} else{printf("%d",b-a);} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_230705/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_230705/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int A, B; scanf("%d %d", &A, &B); if (B % A == 0) { printf("%d", A + B); } else { printf("%d", B - A); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_230749/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_230749/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int a,b; scanf("%d %d",&a,&b); if(b/a*a==b){ printf("%d",a+b); }else{ printf("%d",b-a); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_230792/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_230792/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int a,b; scanf("%d",&a); scanf("%d",&b); if(b%a==0){ printf("%d",a+b); }else{ printf("%d",b-a); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_230842/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_230842/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int A,B; scanf("%d %d",&A,&B); if(B%A==0) { printf("%d\n",A+B); } else { printf("%d\n",B-A); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_230893/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_230893/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
//set many funcs template //Ver.20180717 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.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 min(int a,int b){i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_230936/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_230936/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,d; int x,y; int arr[1002],m[1000]; int i,j,k,l; for(i=0;i<1001;i++) arr[i]=0; for(i=2;i<1001;i++) if(arr[i]==0) { for(j=2;i*j<1001;i++) { arr[i*j]=1; } } i=2;j=0; for(;i<1001;i++) if(arr[i]==0) { m[j]=i; j++; } scanf("%d%d%d%d",&a,&b,&c,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23098/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23098/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 a, b; int c; scanf("%d %d", &a, &b); if(b%a==0) c=a+b; else c=b-a; printf("%d\n", c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_231021/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_231021/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> //累乗(power)a^n(mod10^9+7) long long power(long long a,long long n){ long long count=a,sum=1; while(n>0){ if(n%2==1) sum*=count; count*=count; count%=1000000007; sum%=1000000007; n/=2; } return sum; } //nCr(mod10^9+7) long long int comb(long long int n,long long int r...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_231072/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_231072/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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_231137/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_231137/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #include <math.h> //============================================================================ #define pred(x) ((x)-1) #define succ(x) ((x)+1) //============================================================================ //---------------...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_231195/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_231195/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @Array = dso_local local_un...
#include<stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> #include<limits.h> int n; long count=0; void merge(int *A,int left,int mid,int right){ int *L,*R; L=malloc(sizeof(int)*(mid-left+1)); R=malloc(sizeof(int)*(right-mid+1)); int i; for(i=0;i<mid-left;i++) L[i]=A[left+i]; L[mid-left]=I...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_231238/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_231238/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count = dso_local local_un...
#include <stdio.h> #include <stdlib.h> #include <limits.h> void mergeSort(int* list, int left, int right); unsigned long count = 0; int main() { int n, * a; scanf("%d", &n); a = (int*)malloc(n * sizeof(int)); for (int i = 0; i < n; i++) scanf("%d", a + i); mergeSort(a, 0, n); printf("%lld\n", count); ret...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_231281/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_231281/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count = dso_local local_un...
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> #define scani(x) scanf("%d",&x) #define scanc(x) scanf("%s",x) #define printi(x) printf("%d",x) #define printin(x) printf("%d\n",x) #define printd(x) printf("%.8f",x) #define printc(x) printf("%s",x) #define repd(i,n,m) for(int i = n; i > m; i--) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_231324/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_231324/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 M 200000 #define SNT 2000000000 typedef long long int llong; int L[M / 2 + 2], R[M / 2 + 2]; llong merge(int*, int, int, int, int); llong mergeSort(int*, int, int, int); llong merge(int A[], int n, int left, int mid, int right){ int i, j, k; int n1, n2; llong count = 0; n1 = mid - l...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_231368/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_231368/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @L = dso_local local_unname...
#include<stdio.h> #include<math.h> int main() { unsigned long long int n; scanf("%lld", &n); long long int x; x = ceil(sqrt(n)); while (n%x > 0) x--; int ans = 0; x = n / x; while (x > 0) { ans++; x /= 10; } printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_231469/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_231469/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <stdbool.h> #define S_MAX 1000 #define N_MAX 50 #define M_MAX 50 #define INF 2000000000 #define MOD 1000000007 #define SMAP(a, b) ((a)!=(b))&&((a)^=((b)^=((a)^= (b)))) typedef unsigned long long ull; typedef signed long long dll; typedef struct { int a; int b; int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_231526/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_231526/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @n = dso_local global i64 0...
#include<stdio.h> #define NUMBER 4 int main(void){ int a[NUMBER],b[NUMBER]; int a_number[10],b_number[10]; int hit,blow; int i; while(scanf("%d",&a[0]) != EOF){ hit = blow = 0; for(i=0;i<10;i++){ a_number[i] = b_number[i] = 0; } a_number[a[0]]++; for(i=1;i<NUMBER;i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_231591/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_231591/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 sum1[4], sum2[4]; int i, j, hit, blow; hit = blow = 0; while(scanf("%d%d%d%d\n%d%d%d%d", &sum1[0], &sum1[1], &sum1[2], &sum1[3], &sum2[0], &sum2[1], &sum2[2], &sum2[3]) != EOF){ for(i = 0; i < 4; i++){ for(j = 0; j < 4; j++) if(sum1[i] == sum2[j]) blow++...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_231634/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_231634/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[4]; int b[4]; int i,j; int hit,blow; while(scanf("%d %d %d %d",&a[0],&a[1],&a[2],&a[3])!=EOF) { hit=0;blow=0; scanf("%d %d %d %d",&b[0],&b[1],&b[2],&b[3]); for(i=0;i<4;i++) { for(j=0;j<4;j++) { if(a[i]==b[j]) { if(i==j){hit++;} else{blow++;} ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_231685/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_231685/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,a[4],b[4],t; while(scanf("%d %d %d %d",&a[0],&a[1],&a[2],&a[3])!=EOF){ scanf("%d %d %d %d",&b[0],&b[1],&b[2],&b[3]); int blow=0,hit=0; for(i=0;i<4;i++){ if(a[i]==b[i]){ hit++; } } for(i=0;i<4;i++){ for(t=0;t<4;t++){ if(a[i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_231735/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_231735/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[4], b[4]; int hit, blow; int i, j; while (scanf("%d", &a[0]) != EOF){ hit = blow = 0; for (i = 1; i < 4; i++){ scanf("%d", &a[i]); } for (i = 0; i < 4; i++){ scanf("%d", &b[i]); if (a[i] == b[i]){ hit++; a[i] = -2; } } for (i = 0; i < 4; i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_231786/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_231786/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> // printf(), scanf() #define MAX_N 100 #define MAX_W 10000 int n, W; int v[MAX_N], w[MAX_N], m[MAX_N]; int solve() { int dp[MAX_W + 1]; int deq[MAX_W + 1]; // ?????????(??????????????????) int deqv[MAX_W + 1]; // ?????????(???) int a; int i, j; for (i = 0; i <= MAX_W; ++i) dp[i]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_231829/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_231829/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @n = dso_local global i32 0...
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> long min2(long a,long b){ return a>=b?b:a; } int compare(const void *a, const void *b){return *(long *)a - *(long *)b;} int sqs(long a[],long n,long s){ if(s==4){qsort(a,n,sizeof(long),compare);} return 0; } long mod(long a,long b){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_231887/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_231887/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 cucu(int a, int b) { while (a != b) { if (a > b) a = a - b; else b = b - a; //printf("a=%d b=%d\n", a, b); } return a; } int main(void) { int a = 0, b = 0, unu = 0, doi = 0, gcd = 0, lcm = 0, no = 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23193/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23193/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #define min(X, Y) ((X) < (Y) ? (X) : (Y)) typedef long long ll; int main() { ll ans = 2020; ll l, r; scanf("%lld %lld", &l, &r); for (ll i = l; i <= min(l + 2019, r); i++) { for (ll j = i + 1; j <= min(l + 2019, r); j++) { ans = min(ans, (i * j) % 2019); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_231973/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_231973/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ll long long long long calc (long long a, long long b){ return (a * b) % 2019; } int main(){ ll a, b, min = 1000000000; scanf("%lld %lld", &a, &b); if (a * b < 2019){ printf("%lld\n", a * b); return 0; } else if ((a * b % 2019 == 0) || (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232015/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232015/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <stdbool.h> #include <math.h> long long max(long long A,long long B){ return A>B?A:B; } long long min(long long A,long long B){ return A<B?A:B; } long long roundup(long long A,long long B){ return (A+B-1)/B; } int main(void){ long l...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232059/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232059/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> char s[4040]; int cnt = 0; int main() { int n; scanf("%d",&n); int r = 0, g = 0, b = 0; long long cnt = 0; scanf("%s",s +1); for(int i = 1; i <=n; i++) if(s[i] == 'R') r++; else if(s[i] == 'G') g++; else b++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232101/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232101/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @cnt = dso_local local_unna...
#include<stdio.h> #include<stdlib.h> int main(){ int n,i,j; long long int count,r=0,g=0,b=0; scanf("%d ",&n); char s[4010]; for(i=0;i<n;i++){ scanf("%c",&s[i]); if(s[i]=='R') r++; else if(s[i]=='G') g++; else b++; } count=r*g*b; for(i=0;i<n;i++){ j=1; while(i+j+...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232152/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232152/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <inttypes.h> int N; char S[4096]; int id(char c) { switch (c) { case 'R': return 0; case 'G': return 1; case 'B': return 2; } return 3; } int rui[4][4096]; int main(void) { int i, j; uint64_t kotae = 0; if (scanf("%d", &N) != 1) return 1; if (scanf("%4095s", S) != 1) return ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232196/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232196/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 team[100][2] = {{0}}; int array[31] = {0}; int i = 0, j, k, n, count; while(scanf("%d,%d",&team[i][0],&team[i][1]) ,team[i][0] != 0 ) { i++; } n = i; for(--i; i >= 0; i--) { array[team[i][1]] = 1; } while(scanf("%d",&k) != EOF...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232246/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232246/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[1000],juni[1000]; int i=1,ju=1,k,j; int n,toi; while(1){ scanf("%d,%d",&n,&t[i]); if(n==0)break; i++; } for(k=30;k>=0;k--){ for(j=0;j<i;j++){ if(k==t[j]){ juni[j]=ju; n=1; } } if(n==1){ n=0; ju++; } } while(sc...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232303/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232303/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 num, variety, cake[100], i, max= 0; scanf("%d%d", &num, &variety); for(i= 0; i< variety; i++) { scanf("%d", &cake[i]); if(cake[i]> max) max= cake[i]; } if(max<= (num+ 1)/ 2) printf("0\n"); else printf("%d\n", max* 2- num- 1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232347/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232347/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <limits.h> typedef struct { int l; int r; }pair_t; int main(void) { int n, q; char s[100001] = { 0 }; pair_t pair[100001] = { 0 }; int posi[100001] = { 0 }; int ans = 0; scanf("%d %d", &n, &q); scanf("%s", s); for (int i ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232390/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232390/source.c" target datalayout = "e-m:e-p270: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_t = type { i32...
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(void){ int N,Q,num[100005],l[100005],r[100005],x[100005],i,j; char str[100005],*p,s[100005]; fgets(str,sizeof(str),stdin); p=strtok(str," \n"); N=atoi(p); p=strtok(NULL," \n"); Q=atoi(p); fgets(str,sizeof(str),stdin); p=strtok(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232433/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232433/source.c" target datalayout = "e-m:e-p270: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<stdlib.h> #define MAX(A, B) (((A) > (B)) ? (A) : (B)) int* aclist(char* s, int size) { int f=0; int count=0; int* list = malloc((size + 1) * sizeof(int)); for (int i=0; i<size; i++) { if (*(s + i) == 'A') {f = 1;} else if ((*(s + i) == 'C') && (f)) { count++; f = 0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232477/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232477/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main() { int a[100001],i,n; while(~scanf("%d",&n)) { memset(a,0,sizeof(a)); for(i=0;i<n;i++) scanf("%d",&a[i]); for(i=n-2;i>=0;i--) if(a[i+1]<a[i]) break; printf("%d\n",i+1); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23252/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23252/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 aa[4][2]={{-1,0},{0,-1},{1,0},{0,1}}; int seihou[200][2],an[100][2],i,n,m=0,ten,muki; int minx=0,maxx=0,miny=0,maxy=0; while(1){ scanf("%d",&n); if(n==0)break; seihou[0][0]=0; seihou[0][1]=0; for(i=1;i<n;i++){ scanf("%d%d",&ten,&muki); seihou[i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232563/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232563/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.aa = private ...
#include <stdio.h> int get_uint() { int n = 0; int c = getchar_unlocked(); if(c < 48 || 57 < c) return c; while(47 < c && c < 58) n = 10 * n + (c & 0xf), c = getchar_unlocked(); return n; } void print(unsigned char Q[8][8]) { for(int i = 0; i < 8; ++i) { for(int j = 0; j < 8; ++j) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232620/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232620/source.c" target datalayout = "e-m:e-p270: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> #define N 8 #define FREE -1 #define NOT_FREE 1 #define TRUE 2 int row[N],col[N],dpos[N*2-1],dneg[N*2-1]; int X[N][N]; void putQueen(int); void printBoard(void); void putQueen(int i){ int j; if(i==N){ printBoard(); return; } for(j=0;j<N;j++){ if(col[j]==NOT_FREE || dpos[i+j]=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232664/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232664/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @col = dso_local local_unna...
#include <stdio.h> #define N 8 void print(void); void backtrack(int); int a[N][N] = {{}}; int row[N] = {}; int l[15] = {}; int r[15] = {}; int s[N] = {}; void backtrack(int i){ int j; if(i == N){ print(); return; } for(j = 0;j < N;j++){ if(s[j] == 1 || l[i + j] == 1 |...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232714/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232714/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @a = dso_local local_unname...
#include<stdio.h> int a[8][8], row[8], col[8], d1[17], d2[17]; int f(int i, int j, int s){ int i1 = i + (j==7), j1 = (j + 1) % 8; if(s == 0) return 1; if(i > 7) return 0; if(a[i][j] == 1){ if(f(i1, j1, s-1)) return 1; return 0; } if(row[i] == 0 && col...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232765/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232765/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @a = dso_local local_unname...
#include<stdio.h> #include <stdbool.h> /* boolは、ブーリアン型(Boolean datatype)で、真理値の2つの値 bool true falseのシンボルが定義 */ #define N 8 int row[N]; bool col[N],dpos[2*N-1],dneg[2*N-1]; bool X[N][N]; void initialize(){ for(int i = 0;i < N;i++){ row[i] = -1; col[i] = -1; } for(int i = 0;i < 2*N-1;i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232808/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232808/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @row = dso_local local_unna...
#include<stdio.h> #include<string.h> char s[10][10]; int a[20],b[20],c[20],d[20]; void dfs(int x){ int i; if(c[x] == 1) dfs(x + 1); if(x == 8){ for(i = 0;i < 8;i++) printf("%s\n",s[i]); return; } for(i = 0;i < 8;i++){ if(a[i] == 0 && b[x+i] == 0 && d[x-i+8] == 0) { a[i] = 1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232851/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232851/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @c = dso_local local_unname...
#include <stdio.h> #define EMPTY -111//何もいない状態 #define HERE 100//Queenがいる状態 #define N 8//N×Nの盤面 #define KOSHIN 3180 void putQueen(int); void printBoard(void); int row[N];//横 int col[N];//縦 int dpos[N*2];//左斜め下 dpos = i + j (i -> 行、j -> 列) int dneg[N*2];//右斜め下 dneg = i - j + (N - 1) int judge[N][N]; int main(){ in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232895/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232895/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @col = dso_local local_unna...
#include<stdio.h> #define N 8 #define M 15 int sum[N][N]; void xu(int); int num[N]; int tum[N]; int rum[M]; int hum[M]; void fan(){ int i, j; for(i=0;i<N;i++){ for(j=0;j<N;j++){ if(sum[i][j]){ if(num[i] != j) return; } } } for(i=0;i<N;i++){ for(j=0;j<N;j++){ if(num[i] == j) prin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232938/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232938/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @sum = dso_local local_unna...
#include<stdio.h> #define N 8 #define FREE -1 #define NOT_FREE 1 int row[N],col[N],dpos[2*N-1],dneg[2*N-1]; int X[N][N]; void initialize(); void printBoard(); void recursive(int i); int main(void) { int i,j,k; int r,c; initialize(); for(i=0;i<N;i++) { for(j=0;j<N;j++) { X[i][j]=0; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233001/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233001/source.c" target datalayout = "e-m:e-p270: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> int main() { int n,k,p,s=0,d; scanf("%d %d",&n,&k); while(n--) { scanf("%d",&d); if(d%k!=0) p=(d/k)+1; else p=d/k; s+=p; } if(s%2==0) printf("%d",s/2); else printf("%d",(s/2)+1); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23306/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23306/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #define N 8 #define nf -1 #define f 10 int putQueen(int,int [N],int [N+N-1],int [N+N-1],int[N]); void printBoard(int[N]); char ban[N][N]; int rr[N]; int main(){ int k; int i,r,c,j; int dpos[N+N-1]; int dneg[N+N-1]; int col[N]; int row[N]; scanf("%d",&k); for(i=0;i<N;i++){ ro...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233160/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233160/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int h[100]; int i, j; int d, prev; while (1){ scanf("%d", &n); if (n == 0){ break; } n++; for (i = 0; i < n; i++){ scanf("%d", &h[i]); } for (i = 0; i < n; i++){ prev = 0; d = 0; //printf("(i=%d)", i); for (j = 0; j < n; j++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233203/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233203/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,d; scanf("%d %d %d %d",&a,&b,&c,&d); if(a<b && c<d) { printf("%d",a+c); } else if(a<b && c>d) { printf("%d",a+d); } else if(a>b && c<d) { printf("%d",b+c); } else if(a>b && c>d) { printf("%d",b+d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233254/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233254/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,d,e,f; scanf("%d %d %d %d",&a,&b,&c,&d); if(a>b) e=b; else e=a; if(c>d) f=d; else f=c; printf("%d",e+f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233298/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233298/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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_233355/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233355/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,d,x; scanf("%d %d %d %d",&a,&b,&c,&d); if(a<b) x=a; else x=b; if(c<d) x+=c; else x+=d; printf("%d",x); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233405/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233405/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,D; scanf("%d",&A); scanf("%d",&B); scanf("%d",&C); scanf("%d",&D); int ans; if(A>=B) ans = B; else ans = A; if(C>=D) ans+=D; else ans+=C; printf("%d",ans); return 0;}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233456/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233456/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%I64d",&n); if(n%4==0||(n+1)%4==0){ printf("0"); } else{ printf("1"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2335/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2335/source.c" target datalayout = "e-m:e-p270:32:32-p271: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...
/* AtCoder Beginner Contest 092 A - Traveling Budget 結果: */ #include<stdio.h> //#define DEBUG1 int main() { int a, b, c, d; int ans = 0; scanf("%d %d %d %d", &a, &b, &c, &d); #ifdef DEBUG1 printf("%d\n%d\n%d\n%d\n", a, b, c, d); #endif if (a > b) { ans += b; } else { ans += a; } if (c > d) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233542/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233542/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, d; scanf("%d%d%d%d", &a, &b, &c, &d); int ans = 0; if (a < b) ans += a; else ans += b; if (c < d) ans += c; else ans += d; printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233586/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233586/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int n, k, flag; int b[1000], sr; int i, j; while (scanf("%d %d", &n, &k), n != 0 || k != 0){ for (i = 0; i < k; i++){ scanf("%d", &b[i]); } for (i = 0; i < n; i++){ for (j = 0; j < k; j++){ scanf("%d", &sr); b[j] -= sr; } } for (i = 0; i < k; i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233629/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233629/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<conio.h> #include<stdbool.h> #include<string.h> #include<limits.h> char str[10005]; bool palin(int i,int j) { //printf("%d%d",i,j); while(i<=j) { //printf("%c%c\n",str[i],str[j]); if(str[i]!=str[j]) {return false;} ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23368/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23368/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @str = dso_local global [1000...
#include <stdio.h> #include <stdlib.h> #include <string.h> int a[505][505]; int r_max[505]; int main() { int n,m,q; scanf("%d%d%d",&n,&m,&q); int i,j; int count,temp,iter; int max=-1; for(i=1;i<=n;i++) { temp=0; r_max[i]=0; for(j=1;j<=m;j++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23373/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23373/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 i,a; int x,y,z,w; scanf("%d",&a); x=a/1000;y=(a-x*1000)/100;z=(a-x*1000-y*100)/10; w=(a-x*1000-y*100-z*10); if(x==y||y==z||z==w) printf("Bad"); else printf("Good"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233773/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233773/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 s[4]; int i,j; scanf("%s",s); for(i=0;i<3;i++){ if(s[i]==s[i+1]){ printf("Bad"); return 0; } } printf("Good"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233816/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233816/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100]; scanf("%s",&s); if(s[0]==s[1]||s[1]==s[2]||s[2]==s[3]||s[3]==s[4]) { printf("Bad\n"); } else { printf("Good\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233867/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233867/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main() { char a[10000]; int b; scanf("%s%d",a,&b); int c=strlen(a); int check=0; int i,j; if(c%b==0) { int d=c/b; int e=0; int w=0; for(j=0;j<b;j++) { if(j>0) { e=e+d; } w=0; for(i=e;i<e+d;i++) { w++; if(a[i]==a[e+d-w]) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23391/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23391/source.c" target datalayout = "e-m:e-p270:32:32-p271: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() { long n,i,d,c=0,a[5],k=0,dig=0; scanf("%ld",&n); while(dig<4) { d=n%10; a[k]=d; k++; n=n/10; dig++; } for(i=0;i<3;i++) { if(a[i]==a[i+1]) { c++; break; } } if(c>0) { printf("Bad"); } else { printf("Good"); } return...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233960/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233960/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 p[5]; scanf("%s",p); if(p[0]==p[1]||p[1]==p[2]||p[2]==p[3]){ puts("Bad"); }else{ puts("Good"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234002/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234002/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 S,i,s[5]; scanf("%d",&S); for(i=0;i<4;i++){ s[i]=S%10; S=(int)S/10; } if(s[0]==s[1]||s[1]==s[2]||s[2]==s[3]){ printf("Bad"); }else{ printf("Good"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234046/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234046/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[5],i; scanf("%s",S); for(i = 0;i < 4;i++){ if(S[i] == S[i + 1]){ printf("Bad"); return 0; } } printf("Good"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234097/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234097/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[256]; scanf("%s",s); if (s[0] == s[1] || s[1] == s[2] || s[2] == s[3] || s[3] == s[4] ){ printf("Bad"); }else{ printf("Good"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234147/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234147/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<string.h> #define NEW(p,n){p=malloc((n)*sizeof(p[0]));if(p==NULL){printf("not enough memory\n");exit(1);};} //pの型の変数n個の要素分のメモリを確保し、そのアドレスをpに代入するマクロ #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define SWAP(type, x, y) do { type tmp =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234190/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234190/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { long long X; scanf("%lld", &X); long long sum = 0; long long time = 0; // add unless exceed while (sum < X) { sum += (time++) + 1; } printf("%lld\n", time); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234240/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234240/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[6]; for(int i = 0;i < 6;i++) scanf("%d",&a[i]); int counter[4] = {0,0,0,0}; for(int i = 0;i < 6;i++){ counter[a[i]-1]++; } for(int i = 0;i < 4;i++){ if(counter[i] >= 3){ printf("NO\n"); return 0; } } printf("YES\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234284/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234284/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[4]={0,0,0,0}; int b[6]; int i; for(i=0;i<6;i++){ scanf("%d",&b[i]); } int k; for(k=0;k<6;k++){ a[b[k]-1]=a[b[k]-1]+1; } if(a[0]>0 && a[0]<3 && a[1]>0 && a[1]<3 && a[2]>0 && a[2]<3 && a[3]>0 && a[3]<3){ printf("YES\n"); }else{ printf("NO\n");...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234327/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234327/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 df 0 int cost[8]; int val[8]; typedef long int li ; int main (){ int i,n,ga,sa,ba,gb,sb,bb; scanf("%d%d%d%d%d%d%d",&n,&ga,&sa,&ba,&gb,&sb,&bb); cost[0]=1; cost[1]=ga; cost[2]=sa; cost[3]=ba; cost[4]=gb; cost[5]=sb; cost[6]=bb; cost[7]=1; val[0]=1; val...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234370/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234370/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 P 998244353 int main(void){ int n,k; int l[100],r[100]; int a[400400]={0}; int i,j; scanf("%d%d",&n,&k); for(i=0;i<k;i++){ scanf("%d%d",&l[i],&r[i]); } a[0]=1; for(i=0;i<n;i++){ for(j=0;j<k;j++){ a[i+l[j]]=(a[i+l[j]]+a[i])%P; a[i+r[j]+1]=(a[i+r[j]+1]-a[i]+...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234413/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234413/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n,m,x; int ans=0; int c[12]={0}; int a[12][12]={{0}}; int ability[12]={0}; int sel[12]={0}; int tmp; void sum(int p[]) { tmp=0; for(int j=0;j<m;j++) ability[j]=0; for(int i=0;i<n;i++) { if(p[i]==1) { tmp+=c[i]; for(int j=0;j<m;j+...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234558/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234558/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @ans = dso_local local_unna...
#include<stdio.h> int main() { int n; scanf("%d", &n); char ans[102]; int i, j; for (i = 0; i < 2 * n; i++) ans[i] = '?'; int r, b, c; int min, mid, max; char minc; char res[16]; printf("?"); for (i = 0; i < n; i++) printf(" %d", i + 1); printf("\n"); fflush(stdout); scanf("%s", res); minc = res[0]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234644/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234644/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdlib.h> #include <stdio.h> int cmpf(const void *x, const void *y){ return (*(int*)x-*(int*)y); } int main(){ int N; scanf("%d",&N); int *a; a=malloc(sizeof(int)*N); for(int i=0;i<N;i++) scanf("%d",&a[i]); qsort(a,N,sizeof(int),cmpf); double mid=(double)a[N-1]/2; int malim=N-2,milim=0; whi...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234701/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234701/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
//D - Road to Millionaire / //Hiia #include <stdio.h> typedef long long ll; int main(){ ll n; scanf("%lld", &n); ll a[200010]={}; for(ll i = 1; i <= n; i++){ scanf("%lld", &a[i]); } ll money=1000,tmp; for(ll i = 1; i <= n-1; i++){ if(a[i]<a[i+1]){ tmp=money/a[i]; money=money%a[i] + t...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234745/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234745/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> void upheap(int *buff, int n) { while (1) { int p = (n - 1) / 2; if (p < 0 || buff[p] >= buff[n]) break; int temp = buff[n]; buff[n] = buff[p]; buff[p] = temp; n = p; } } void downheap(int *buff, int n, int size) { whil...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234789/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234789/source.c" target datalayout = "e-m:e-p270: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 <math.h> #include <stdio.h> #include <stdlib.h> typedef long long ll; ll n, p, i, j, ans, l; int main() { scanf("%lld%lld",&n,&p); if(n==1)printf("%lld\n",p); else if(p==1)printf("1\n"); else { ans=1; j=0;while(p%2==0){p/=2;j++;} if(j/n>0) ans*=pow(2,j/n); for(i=3, l=sqrt(p)+1;i<l;i+=4){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234831/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234831/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&n); float p; int a; a=n/2; float b; b=a; float c; c=n; p=1-b/c; printf("%f",p); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234875/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234875/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; double a,x; scanf("%d",&N); if(N%2==0) { x=(double)(N/2)/N; printf("%0.10lf",x); } else if(N%2!=0) { a=(N+1)/2; x=(double)a/N; printf("%0.10lf",x); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234932/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234932/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&n); int count=0; for(int i=1;i<=n;i++){ if(i%2!=0) count++; } double n1=n; double p=count/n1; printf("%f\n",p); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234976/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234976/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int n , i , a=0; scanf("%d",&n); for(i=1; i<=n; i++) { if(i%2==1) a++; } printf("%f",(double)a/n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235018/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235018/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...