Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> long long chmax(long long a, long long b){ if(a < b) return b; return a; } int main() { int i, j; int n; long long a[100010] = {0}; long long b[100010] = {0}; long long c[100010] = {0}; long long dp[100010][3]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257004/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257004/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a[100000]; int b[100000]; int c[100000]; int N; int ans[3][100000]; int max(int x,int y){ if(x<y) return y; else return x; } int main(){ scanf("%d",&N); for(int i=0;i<N;i++){ scanf("%d",&a[i]); scanf("%d",&b[i]); scanf("%d",&c[i]); } /...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257048/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257048/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() { char inputNumbers[5]; char temp[2]; int a, b, c, d; int sum; char symbols[3]; scanf("%s", &inputNumbers); temp[1] = '\0'; temp[0] = inputNumbers[0]; a = atoi(temp); temp[0] = inputNumbers[1]; b = atoi(temp); tem...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257091/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257091/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 BUF_SIZE 15 int main(void) { FILE *fp = stdin; char line[BUF_SIZE]; if(!fgets(line, BUF_SIZE, fp)) return 0; int arr[4]; int i, j; for(i = 0; i < 4; i++) { arr[i] = line[i] - '0'; } for(i = 0; i < 8; i++) { // 2**3 int sum = ar...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257134/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257134/source.c" target datalayout = "e-m:e-p270: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> #include <math.h> int main() { int a[4],b[3],i,m[3]; char num[5]; scanf("%s",num); for (i=0;i<4;i++) { a[i]=num[i]-'0'; } for (i=0;i<8;i++) { m[0]=i%2; m[1]=i/2%2; m[2]=i/4%2; b[0]=pow(-1,m[0])*a[1]; b...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257178/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257178/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i, j; int n; scanf("%1d %1d %1d %1d", &a, &b, &c, &d); for(i = 0; i < (1 << 4); i++){ //全てのパターンをbitによって列挙 n = a; n += (i&1) ? b : -b; //1にフラグが立ってたらプラス。否だとマイナス n += (i&2) ? c : -c; //2にフラグが立ってたらプラス。否だとマイナス n += (i&4) ? d : -d; //3にフラグが立...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257220/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257220/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int descending_compare(const void *a, const void *b){ return (int)(*(int*)b - *(int*)a); } int ascending_compare(const void *a, const void *b){ return (int)*(int*)a - *(int*)b; } int main(void){ int input; int nums[4]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257264/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257264/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,n,i; char op[3]; scanf("%d",&n); d=n%10; n/=10; c=n%10; n/=10; b=n%10; a=n/10; for(i=0;i<8;i++){ n=a; if(i%2==0){ op[2]='-'; n-=d; } else{ op[2]='+'; n+=d; } if(i/2%2==0){ op[1]='-'; n-=c; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257307/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257307/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,n,a; int sum=0; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&a); sum+=a; } printf("%d",sum-n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257358/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257358/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int a[n]; int sum=0; scanf("%d",&n); for(i=0; i<n; i++){ scanf("%d",&a[i]); sum += a[i]; } printf("%d\n",sum-n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257400/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257400/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,r=0,t; scanf("%d",&n); while(n--) { scanf("%d",&t); r+=t-1; } printf("%d\n",r); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257451/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257451/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,sum=0,a[3000]={0}; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d",&(a[i])); sum+=(a[i]-1); } printf("%d",sum); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257501/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257501/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int A[6020]; void input(){ scanf("%d",&N); for (int i = 0; i < 3*N; i++) scanf("%d",&A[i]); } int dp[2020][2020]; int dp_maxk[2020]; int dp_max; void chmax(int *a,int b){ if(*a < b) *a = b; } void swap(int *pa, int *pb) { int tmp; tmp = *pa; *pa = *pb; *pb = tmp; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257545/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257545/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int i,j,e[4]; for(i=0;i<4;i++) scanf("%d",&e[i]); for(i=0;i<3;i++){ for(j=3;j>i;j--){ if(e[j-1]>e[j]){ int tmp=e[j-1]; e[j-1]=e[j]; e[j]=tmp; } } } if(e[0]==e[1]&&e[2]==e[3]) puts("yes"); else puts("no"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257596/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257596/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { if (c == d) { printf("yes\n"); return 0; } printf("no\n"); return 0; } else if (a == c) { if (b == d) { printf("yes\n"); return 0; } printf("no\n"); retur...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257639/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257639/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ long long int n,a,flag=0; scanf("%I64d",&n); while(1){ if(n==0||n==1){ break; } if(n%2==0){ a=n; n=n-a; flag=1; } if(n%2!=0){ a=n-1; n=n-a; flag=1; } if(n==0){ break; } if(n%2==0){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25769/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25769/source.c" target datalayout = "e-m:e-p270:32:32-p271: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){ long a,b,k; scanf("%ld %ld %ld", &a, &b, &k); int takahashi = a; int aoki = b; for (long i = 0; i < k; i++) { if (i%2 == 0) { takahashi /= 2; aoki += takahashi; } else { aoki /= 2; takahashi += aoki; } } printf("%d %d\n", takahashi, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257732/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257732/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int A, B, K, i; scanf("%d%d%d", &A, &B, &K); for (i = 0; i < K; ++i) { if (i % 2) { A += B / 2; B /= 2; } else { B += A / 2; A /= 2; } } printf("%d %d", A, B); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257819/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257819/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ans = 0; void dfs(int array[], int k, int s){ if(array[0] == 2){ int sum = 0; for(int i=1; i<=3; i++) sum += array[i]; if(s-k <= sum && sum <= s) ans++; return; } for(int i=0; i<=k; i++){ array[++array[0]] = i; dfs(array, k, s); array[0]--; } }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257862/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257862/source.c" target datalayout = "e-m:e-p270: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> #include <stdlib.h> int num(){ char s[11]; int i, n; for(i=0; i<sizeof(s); i++){ s[i] = getchar(); if(s[i] == ' ' || s[i] == '\n'){ s[i] = '\0'; break; } } sscanf(s, "%d", &n); return n; } int main(void){ int k, s; int x,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257905/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257905/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int main() { int k, s; int x, y, z, cnt = 0; scanf("%d%d", &k, &s); for(x = 0; x <= k; x++){ for(y = x; y <= k; y++){ for(z = y; z <= k; z++){ if(x+y+z == s){ if(x =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257949/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257949/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, k; scanf ("%d", &n); int t[n + 1]; for (i = 0; i < n; i++) { scanf ("%d", &t[i]); } for (i = 0; i < n; i++) { if (t[i] % 2 == 0) { k = t[i] / 2; printf ("%d\n", k); } if (t[i] % 2 == 1) { k = (t[i] - 3) / 2; printf ("%d\n", k + 1); } } return...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 cons...
#include<stdio.h> int main(void){ int K,S; int x,y,z,count; scanf("%d %d",&K,&S); for(x=0;x<=K;x++){ for(y=0;y<=K;y++){ if(0<=(S-x-y)&&(S-x-y)<=K) count++; } } printf("%d\n",count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258041/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258041/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 calculate_pattern(int , int ); int main(void){ int konstante, sum; int pattern; scanf("%d %d", &konstante, &sum); pattern = calculate_pattern(konstante, sum); printf("%d\n", pattern); return 0; } int calculate_pattern(int konstante, int sum){ int x, y, z; int pattern = 0; for (x...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258085/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258085/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int K, S; int x, y, z; int cnt = 0; scanf("%d %d", &K, &S); for( x = 0; x <= K; x++ ){ for( y = 0; y <= x; y++ ){ for( z = 0; z <= y; z++ ){ if( x + y + z == S ){ if( x==y || y==z || z==x ){ if( x==y && y==z ) cnt++; else{ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258135/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258135/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[14]; int i=0,n; while (scanf("%d",&n)!=EOF){ if(n==0){ i--; printf("%d\n",a[i]); }else{ a[i]=n; i++; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258186/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258186/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 train[10]; int num, i = 0; while(scanf("%d", &num) != EOF){ if(num == 0){ i--; printf("%d\n", train[i]); }else if(1 <= num && num <= 10){ train[i] = num; i++; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258229/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258229/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 data[100]; int sp = 0; void push(int v){ data[sp] = v; sp++; } void pop(){ sp--; } int main(){ int i,n,d; while(1){ d = scanf("%d",&n); if(d == EOF)break; if(n==0){ pop(); printf("%d\n",data[sp]); } else{ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258322/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258322/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @sp = dso_local local_unnam...
#include<stdio.h> int main(void){ int n,in,stack[10],c=0; while((scanf("%d",&in))!=EOF){ if(in!=0){ stack[c]=in; c++; } else{ printf("%d\n",stack[c-1]); c--; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258409/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258409/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main(void) { int *train; int train_no; int no; int i; no = 0; train = (int *)malloc(sizeof(int)); while (scanf("%d", &train_no) != EOF){ if (train_no != 0){ no++; } else { no--; printf("%d\n", train[no]); } train = (int *)realloc(train, no * sizeof...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258452/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258452/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n,m,f=0,k,i; scanf("%d%d",&n,&m); if(n%2==0) k=n/2; else k=n/2+1; for(i=k;i<=n;i++) { if(i%m==0) { f=1; break; } } if(f) printf("%d\n",i); else pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25851/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25851/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 1010 #define M 1010 int main(void){ int i,num,j,jj; char ch[N]; int count,wcount; int locm[M]={0},lenm[M]={0}; for(i=0;scanf("%c",&ch[i])==1;i++){} num=i; count=0; wcount=0; for(i=0;i<num;i++){ if(ch[i]==' ' || ch[i]=='.' || ch[i]==','){ if(3<=co...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258582/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258582/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #define BIG 2000000007 #define MOD 1000000007 typedef unsigned long long ull; typedef signed long long sll; #define N_M...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258632/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258632/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.hw = type { i32, i3...
#include <stdio.h> int main(void){ int n; scanf("%d", &n); while(n>0){ printf("ACL"); n--; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258676/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258676/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 K,n=0; scanf("%d",&K); while(n<K){ printf("ACL"); n++; } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258719/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258719/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 EPS 0.0000000002 #define MAX 1010001000 typedef struct point{ double x, y; }point; typedef struct line{ point st, en; }line; double norm(point a); double norm2(point a); double distans(point a, point b); point sum_vector(point a, point b); point diff_vector(point ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258762/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258762/source.c" target datalayout = "e-m:e-p270: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.line = type { %stru...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> #include <stdlib.h> #include <stdbool.h> #define MOD 1000000007 #define END printf("\n");return 0; #define QS09(how_data,data) qsort(data,how_data,sizeof(long),(int (*)(const void *,const void *))qsort_09); #define QS90(how_data,data) qsort(da...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258834/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258834/source.c" target datalayout = "e-m:e-p270: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.wdg = type { i64, i...
#include <stdio.h> #include <math.h> int main(int argc, char const *argv[]) { int i, n; int hh, mm; // 時刻 double angle_longhand, angle_shorthand; // 長針短針の角度 double angle; // 差を入れる変数 scanf("%d", &n); // 判定する時刻の個数を入力 if(n >= 1 && n <= 10000) { for(i = 0; i < n; i++) { scanf("%d:%d", &hh, &mm); // 時刻を入力 ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258878/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258878/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <stdbool.h> int main() { int i, j, n, tmp1, tmp2, tmp3; int kanribanp, kanriban[1001] = {0}; char flag; long long int kanri[4001] = {0}; while (true) { kanribanp = 0; for (i=0; i < 4001 ;i++) { if (i < 1001) kanriban[i] = 0; kanri[i] = 0; } scanf("%d", &n); if (n == 0)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258920/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258920/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 num,data[4001],i,j,employee[4001],price,amount,flag,sp; while (1) { scanf("%lld\n",&num); if (num==0) break; for (i=1;i<=4000;i++) data[i]=0; flag=0; sp=0; for (i=0;i<num;i++) { scanf("%lld %lld %lld\n",&em...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258971/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258971/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, const char * argv[]) { long d, i, s; while (scanf("%ld\n", &d) != EOF) { s = 0; for (i=0; i<600 ;i += d) { s += i*i*d; } printf("%ld\n", s); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259013/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259013/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 = 600, d, i, S; while (scanf("%d", &d) != EOF){ S = 0; for (i = 0; i < x/d; i++){ S += d * (d*i)*(d*i); } printf("%d\n", S); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259071/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259071/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, const char * argv[]) { int d,i,s=0; while(scanf("%d",&d)!=EOF){ s=0; for(i=1;i<600/d;i++){ s+=d*(i*d)*(i*d); } printf("%d\n",s); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259114/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259114/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,d,sum=0; while(scanf("%d",&d)!=EOF){ sum=0; for(i=0;i*d<600;i++){ sum+=d*(i*d*i*d); } printf("%d\n",sum); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259172/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259172/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> /* prototype declaration */ int integral(int d); int f(int x); int main(int argc, const char *argv[]) { int d; while(scanf("%d",&d) != EOF) printf("%d\n", integral(d)); return 0; } int integral(int d) { int i, s = 0, limit = 600-d; for(i=1; i<=limit/d; i++){ s += d*f(i*d); } return s;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259237/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259237/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int i; int sum; while (~scanf("%d", &d)){ sum = 0; for (i = d; i < 600; i += d){ sum += d * i * i; } printf("%d\n", sum); } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259288/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259288/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 d,i,reslt; while(scanf("%ld",&d)==1) { reslt=0; for(i=1;i<600;i++) { reslt+=(i*d*d*d*i); reslt%=72000000; if(i*d==(600-d)) break; } printf("%ld\n",reslt); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259345/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259345/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #define MOD (1000000007) static inline long mdadd(long a,long b){ return (a+b) % MOD; } static inline long mdml(long a,long b){ long long res = (long long)a * b; return res % MOD; } static inline long mdpow(long num,long ind){ unsigned long c = (unsigned long)ind; long res = 1l...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259389/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259389/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> long long int modpow(long long int a, long long int n, long long int p) { if (n < 0) return 0; long long int res = 1; while (n > 0) { if (n % 2 > 0) res = res * a % p; n /= 2; a = a * a % p; } return res; } int main() { int x, y; scanf("%d %d", &x, &y); long long int p = 1000000007...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259431/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259431/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ex4_3 terakura */ #include <stdio.h> int depth(int west_height, int east_height); int main(void){ int west_height, east_height; scanf("%d %d", &west_height, &east_height); printf("%d\n", depth(west_height, east_height)); return 0; } int depth(int west_height, int east_height){ int diff,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259475/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259475/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ex4_3 kento_titech*/ #include<stdio.h> int snow_height(int h_west,int h_east);//積雪を求める関数のプロトタイプ宣言 int main(void){ int a,b;//a,bはそれぞれ西と東に見える高さ scanf("%d %d",&a,&b); printf("%d\n",snow_height(a,b)); return 0; } int snow_height(int h_west,int h_east){//h_west,h_eastはそれぞれ西と東に見える部分の高さ int heig...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259525/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259525/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ex4_3 pptenshi */ #include<stdio.h> int west_tower_num(int height_west, int height_east); int height_tower(int num); int main(void) { int height_west, // a height_east, // b snowfall; // 積雪量 // input scanf("%d%d", &height_west, &height_east); // calculate ans sno...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259569/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259569/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,h=0,i; scanf("%d",&a); scanf("%d",&b); for(i=0;i<=b-a;i++) h=h+i; printf("%d",h-b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259611/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259611/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int a, b; int diff; int i, j, k; int tall=0; scanf("%d %d", &a, &b); diff = b-a; for(i=0; i<=diff; i++){ tall += i; } printf("%d", tall -b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259655/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259655/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, s1, s2, x, i; scanf("%d %d", &a, &b); s1 = 0; s2 = 0; for (i = 1; i <= 999; i++) { s1 = (i * (i + 1)) / 2; s2 = ((i + 1) * (i + 2)) / 2; if (s1 - a == s2 - b) { x = s1 - a; break; } } printf("%d\n", x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259699/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259699/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); int j=0; int i=0; for(i=1;i<=b-a;i++) { j=j+i;} printf("%d",j-b); return 0;}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259741/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259741/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,sa,sum = 0; scanf("%d",&a); scanf("%d",&b); sa = b - a; for(int i = 0;i < sa;i++){ sum += i; } printf("%d",sum - a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259792/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259792/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,n,i,h=0,ans; scanf("%d %d",&a,&b); n = b - a; for(i=1;i<=n;i++) { h += i; } ans = h - b; printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259835/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259835/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* Aizu Vol0 0155: Spider Jin 2017.8.16 bal4u@uu ?????????????????? */ #include <stdio.h> #include <math.h> #define MAX 100 int x[MAX + 5], y[MAX + 5], N; long long d[MAX + 5][MAX + 5]; int p[MAX + 5]; char visited[MAX + 5]; #define INF 1.0e20 double total[MAX + 5]; void search(int s, int g) { int i, j, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259879/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259879/source.c" target datalayout = "e-m:e-p270: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> int main(){ char n; scanf("%c", &n); printf("%c", n+1); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259994/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259994/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a; scanf("%c",&a); printf("%c\n", a+1); return 0; } /*d e*/
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260042/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260042/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%c",&c); printf("%c",c+1); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260086/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260086/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 c; char C; scanf("%c",&C); c = C; c=c+1; printf("%c",c); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260129/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260129/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x; scanf("%c",&x); if(x>='a' && x<='z'){ x=x+1; } printf("%c\n",x); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260187/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260187/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> char s[200005]; int c[2][200005]; int main(){ int t,n; scanf("%d",&t); while(t--){ scanf("%s",s); n=strlen(s); for(int i=0;i<n;i++)c[0][i]=c[1][i]=0; for(int i=0;i<n;i++){ c[0][i]=s[i]=='0',c[1][i]=s[i]=='1'; if(i)c[0][i]+=c[0][i-1],c[1][i]+=c[1][i-1]; } int ans...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_26023/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_26023/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> //EXIT_FAILURE #include <assert.h> int main(){ int ret; char c; if((ret = scanf("%c",&c))== EOF){ return EXIT_FAILURE; } assert(97<= c && c <=121); c += 1; printf("%c\n",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260288/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260288/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ char C; int ASC; scanf("%s",&C); ASC = C; ASC ++; C = ASC; printf("%c",C); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260330/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260330/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a,b,c; scanf("%c",&a); if(a == 122){ printf("a"); } else{ b = a + 1; printf("%c",b); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260381/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260381/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%c",&c); printf("%c", c + 1); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260424/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260424/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i = 10, n, ans = 0; scanf("%lld",&n); for(; i <= n; i *= 5) ans += n / i; printf("%lld\n",n % 2 ? 0 : ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260468/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260468/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { long long int n; scanf("%lld",&n); if(n%2==1) printf("0\n"); else { long long int t=n/10,u=10; for(int i=1;i<25;i++) { u=u*5; t+=n/u; } printf("%lld\n",t); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260518/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260518/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a, b; scanf("%c %c", &a, &b); if (a == b) { printf("H\n"); } else { printf("D\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260561/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260561/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ char a,b; scanf("%c %c",&a,&b); if(a == 'H'){ (b == 'H') ? printf("H"):printf("D"); }else{ (b == 'H') ? printf("D"):printf("H"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260604/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260604/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> //絶対値 long long int change_plus(long long int a) { if (a < 0) { return -a; } if (a >= 0) { return a; } } //大小比較(大) long long int big(long long int a, long long int b) { if (a >= b) { return a; } else { return b; } } //大小比較(小) long long int small(long lo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260655/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260655/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a,b; scanf("%c %c",&a,&b); if(a==b) printf("H"); else printf("D"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260699/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260699/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a,b; scanf("%c",&a); getchar(); scanf("%c",&b); if(a=='H') { if(b=='H') printf("H"); if(b=='D') printf("D"); } if(a=='D') { if(b=='H') printf("D"); if(b=='D') printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260763/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260763/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 main() { char s[11]; char t[4]={'\0'}; int i, j, n, ans=10000; scanf("%s", s); n=strlen(s); for (i=0;i<n-2;i++) { for (j=0;j<3;j++) t[j]=s[i+j]; if (abs(atoi(t)-753)<ans) ans=abs(atoi(t)-753); }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260813/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260813/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <stdlib.h> int main (void){ int dif; int min = 753; long int S; scanf("%ld", &S); while(S > 99){ dif = S % 1000 - 753; if (dif < 0){ dif = -dif; } if (dif < min){ min = dif; } S ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260857/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260857/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 str[10]; int i = 0; int j, ch, ans, res; while((ch = fgetc(stdin)) != '\n'){ str[i] = ch - '0'; i++; } res = 753; for(j = 0; j < i-2; j++){ ans = str[j]*100 + str[j+1]*10 + str[j+2] - 753; if(ans < 0) ans = -ans; if(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260950/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260950/source.c" target datalayout = "e-m:e-p270: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> #include <string.h> #include <math.h> int main() { int a, b, d, X, Y; double c; // long long a, b, c, d, X, Y; int D, G; //char s[101][101]={}; char sv[101]={}; char ss[101]={}; // char s_temp[101]={}; char t[11]={}; // char s[10000000000000000001]={}; char...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261021/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261021/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* AOJ #2920 title: @kankichi573 */ #include <stdio.h> #include <float.h> #include <limits.h> #define min(x,y) (((x)<(y))?(x):(y)) int main() { int i,ret,sum,n,b,oddmin; oddmin=INT_MAX; sum =0; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d",&b); if(b & 1) oddmin =min(oddmin,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261065/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261065/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, M,tmp; long long ans = 0; scanf("%lld%lld", &N, &M); if (N > M) { tmp = N; N = M; M = tmp; } if (N == 1 && M == 1) { ans = 1; } else if (N == 1 && M != 1) { ans = M - 2; } else if (N >= 2) { ans = (N - 2)*(M - 2); } printf("%lld\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261115/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261115/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[3][6],i,j,sum[3]; int x[3][3]; for(i=0;i<3;i++){ sum[i]=0; for(j=0;j<6;j++) scanf("%d",&a[i][j]); } for(i=0;i<3;i++) sum[i]=a[i][2]+(a[i][0]*3600)+(a[i][1]*60); for(i=0;i<3;i++) sum[i]=(a[i][5]+(a[i][3]*3600)+(a[i][4]*60))-sum[i]; for(i=0;i<3;i++)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261166/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261166/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[6], b[6], c[6], i; for(i = 0 ; i < 6 ; i++){ scanf("%d",&a[i]); } for(i = 0 ; i < 6 ; i++){ scanf("%d",&b[i]); } for(i = 0 ; i < 6 ; i++){ scanf("%d",&c[i]); } a[0] = a[3] - a[0]; a[1] = a[4] - a[1]; if(a[1] < 0){ a[0] -= 1; a[1] = 60 + a[1]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261223/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261223/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> struct edge { int a; int b; int weight; }; int *ufp, *ufr; struct edge *ed; void downheap(int, int); int UF_find(int); void UF_union(int, int); int Kruskal(int, int); int main(void) { int i, j, v, e, s, t, w, cost; scanf("%d %d", &v, &e); ufp = (int*)malloc(sizeof(int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261274/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261274/source.c" target datalayout = "e-m:e-p270: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.edge = type { i32, ...
#include<stdio.h> //小さい順にソート long long int c[200010]; void merge(long long i,long long j,long long int *s){ if(i!=j){ merge(i,(i+j)/2,s); merge((i+j)/2+1,j,s); long long a=i,b=(i+j)/2+1; long long d; for(d=i;d<=j;d++){ if((i+j)/2<a){ c[d]=s[b]; b++; } else if(j<b)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261324/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261324/source.c" target datalayout = "e-m:e-p270: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> #include <string.h> #include <stdlib.h> #include <math.h> int main() { int n, l, r; scanf("%d", &n); int mysum = 0; for (int i = 0; i < n; i++) { scanf("%d %d", &l, &r); mysum += r - l + 1; } printf("%d", mysum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261368/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261368/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 r; int l; int seats[100000] = {0}; int result = 0; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d %d", &l, &r); for (int j = l; j <= r; j++) { seats[j - 1] = 1; } } for (int i = 0; i < 100000; i++) { if (seats[i]) { result++; } }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261410/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261410/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, l[1005], r[1005], S; scanf("%d", &N); S=0; for (i=1; i<=N; i++) { scanf("%d %d", &l[i], &r[i]); S+=r[i]-l[i]+1; } printf("%d", S); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261461/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261461/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,r,l,lhy,i; int main() { scanf("%d",&n); for(i=1;i<=n;i++) {scanf("%d%d",&l,&r); lhy+=r-l+1;} printf("%d\n",lhy); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261511/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261511/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <memory.h> #include <stdlib.h> int main(void) { int i,n,l,r,sum=0; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%d %d",&l,&r); sum+=r-l+1; } printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261555/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261555/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// ABC073B.C #include<stdio.h> int N, l[1001] = {0}, r[1001] = {0}; int main(void){ int i, sum = 0; scanf("%d", &N); for (i = 0; i < N; i++) { scanf("%d %d",&l[i], &r[i]); } for (i = 0; i < N; i++) { sum += (r[i] - l[i] + 1); } printf("%d\n", sum); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261605/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261605/source.c" target datalayout = "e-m:e-p270: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 global [1001...
#include <stdio.h> int main(){ char str[3][3]; for(int i=0;i<3;i++){ scanf("%c%c%c\n",&str[i][0],&str[i][1],&str[i][2]); } printf("%c%c%c\n",str[0][0],str[1][1],str[2][2]); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261649/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261649/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 str(const char c[4][4]){ int i; for(i = 0; i < 3; i++){ putchar(c[i][i]); } } int main(void){ char c[4][4]; int i; for(i = 0; i < 3; i++){ scanf("%s", c[i]); } str(c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261692/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261692/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int i,k,r; scanf("%d %d",&k,&r); for (i=1;i<=10;i++) { int price = i * k; if (price%10==r || price%10==0) { break; } } printf("%d",i); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_26175/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_26175/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main () { char a[2]; char b[2]; char c[2]; scanf("%s", a); scanf("%s", b); scanf("%s", c); printf("%c%c%c\n", a[0], b[1], c[2]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261793/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261793/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 input[2][2] = {{""}, {""}, {""}}; for (int i = 0; i <= 2; i++) { scanf("%s",input[i]); printf("%c",input[i][i]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261836/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261836/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); int a[N]; for(int i=0;i<N;i++)scanf("%d",&a[i]); int b[N]; int po[N]; for(int i=0;i<N;i++)po[i]=0; for(int i=0;i<N;i++){ scanf("%d",&b[i]); po[b[i]-1]++; } for(int i=0;i<N;i++){ if(po[i]==0){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261887/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261887/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #ifndef _TJYTLXWXHYZQFW_COMMON_H #define _TJYTLXWXHYZQFW_COMMON_H #include <assert.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define offset(t,m) ((unsigned long)&(((t*)0)->m)) #define container_of(a,t,m) ((t*)((unsigned long)a-offset(t,m))) #define ULL1 ((unsig...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_26193/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_26193/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...
#pragma warning(disable:4996) #include <stdio.h> #include <stdlib.h> #include <string.h> #define _USE_MATH_DEFINES #include <math.h> #include <float.h> #pragma region 定義 typedef long long ll; typedef unsigned long long ull; #define _itoa(A,N) sprintf(A, "%d", N); int i_dsort(const void* a, const void* b); int i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261988/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261988/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @pc = internal unnamed_addr...