Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> int cont=0; int check(long long int num) { int i,j,index=0; for(j=2;j*j<=num;j++) { if(num%j == 0) index = 1; } if(index == 0) cont = cont+1; return 0; } int main() { int size,i; scanf("%d",&size); long long in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248454/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248454/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @cont = dso_local local_unn...
#include <stdio.h> #include <math.h> #include <stdbool.h> bool IsPrime (int n) { if (n <= 3) { return true; } int sqn = sqrt(n); for (int i = 2; i <= sqn; ++i) { if(n % i == 0) { return false; } } return true; } int main() { #ifdef TEST freopen("input",...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248511/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248511/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int A[10000]; int main() { int n,i,j,flag,count=0; scanf("%d",&n); for(i=0; i<n; i++) { scanf("%d",&A[i]); } for(i=0; i<n; i++) { flag=0; if(A[i]%2==0 && A[i]!=2) continue; for(j=3; j*j<=A[i]; j+=2) { if(j==A[i]) break; if(A[i]%j==0) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248562/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248562/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 Prime(int x){ int h; if ( x < 2 ) return 0; else if ( x == 2 ) return 1; if ( x % 2 == 0 ) return 0; for ( h = 3; h*h <= x; h+=2 ){ if ( x % h == 0 ) return 0; } return 1; } int main(){ int n, x, f; int count = 0; scanf("%d", &n); for ( f = 0; f < n; f++ ){ scanf("%d"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248605/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248605/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 isprime(int); int main() { int i, end, numdata, data, primecount = 0; scanf("%d",&numdata); for(i = 0; i < numdata; i++) { scanf("%d",&data); primecount += isprime(data); // printf("%d ",primecount); } printf("%d\n",primecount); return 0; } int is...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248649/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248649/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int i, j, n, A[10000], count = 0; scanf("%d",&n); for (i = 0; i < n; i++){ scanf("%d",&A[i]); } for (i = 0; i < n; i++){ if (A[i] > 1){ for (j = 2; j*j <= A[i]; j++) if (A[i] % j == 0){ count++; break; } } else count++; } printf("%d\n",n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248692/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248692/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 prime(int); int main(){ int i,j,n,s,a=0,c=0; scanf("%d",&s); for(i=0;i<s;i++){ scanf("%d",&n); a= prime(n); if(a==1) c++; } printf("%d\n",c); return 0; } int prime(int x){ int i; if(x<=1)return 0; for(i=2;i<=sqrt(x);i++){ if(x%i==0){ return ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248735/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248735/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a[10000],c=0,d=0,k=3,n,i; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&a[i]); //printf("%d\n",a[i]); } for(i=0;i<n;i++){ if(a[i]==2){ c++; } else if(a[i]==1){ } else if(a[i]%2!=0){ while(k<=sqrt(a[i])){ if(a[i]%k==0){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248779/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248779/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> void sosuu(int a[], int n); int main(void){ int n, i; scanf("%d", &n); int a[n]; for(i=0; i<n; i++){ scanf("%d", &a[i]); } sosuu(a, n); return 0; } void sosuu(int a[], int n){ int i, ii; int count=n; for(i=0; i<n; i++){ ii=2; while(ii<=sqrt(a[i])){ if(a[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248821/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248821/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> int main() { int a,b,i,n,x,y,vel; double dis,temp=1001000; scanf("%d %d",&a,&b); scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d %d %d",&x,&y,&vel); dis=sqrt((x-a)*(x-a)+(y-b)*(y-b)); if(temp>dis/vel) { temp=dis/vel; } } printf("%.14lf\n",temp); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24888/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24888/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <math.h> int isprime(int); int main(){ int n,N[10000],count=0,i; int jud; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&N[i]); } for(i=0;i<n;i++){ jud = isprime(N[i]); if(jud == 1){count++;} } printf("%d\n",count); return 0; } int isprime(int x){ int ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248937/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248937/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N 10000 int isprime(int); int main(){ int A[N],n; int i; int count=0; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&A[i]); if(isprime(A[i])==1)count++; } printf("%d\n",count); return 0; } int isprime(int x){ int i=3; if(x==2)return...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_248980/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_248980/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <math.h> #define M 10000 #define MAX 10*10*10*10*10*10*10*10 int isprime(int x); int main(){ int i,n; int A[M]; int P=0; scanf("%d",&n); if(n < 1 || n > M) exit(1); for(i=0;i<n;i++){ scanf("%d",&A[i]); if(A[i] < 2 || A[i] > MAX) exit(2); if(1 ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249022/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249022/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 prime(int x) { int i; if( x == 2) return 1; if(x < 2 || x % 2 == 0) return -1; i = 3; while(i * i <= x) { if(x % i == 0) return -1; i = i + 2; } return 1; } int main(void) { int n , m , i; in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249066/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249066/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #define MAX 10000 #define T 1 #define F 0 int i; int isPrime(int x){ // printf("%d",x); if(x<=1){ return F; } if(x==2) return T; if(x%2==0) return F; for(i=3;i*i<=x;i+=2){ if(x%i==0 && x!=i){ return F; } } return T; } int main(){ int i,j=0,x[MAX],n,c; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249109/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249109/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @i = dso_local local_unname...
#include<stdio.h> #include<math.h> int main () { int a,b,n,x,y,z,i,Yes_this_is_the_begining=1; double m,o,p,q; scanf("%d %d",&a,&b); scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d %d %d",&x,&y,&z); m=(a-x)*(a-x)+(b-y)*(b-y); o=sqrt(m); p=o/z; if(Yes_this_is_...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24916/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24916/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <string.h> int main(void){ char s[100000+5]; scanf("%s", s); int n=strlen(s); int ans[100000]={0}; int i=0; while(i<n){ int r=0, l=0; while(s[i]=='R')i++, r++; int p=i; while(s[i]=='L')i++, l++; ans[p-1]=(r+1)/2+l/2; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249202/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249202/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 reverse_array(type, arr, n) \ do { \ for (int i = 0; i < n / 2; i++) { \ type __t = arr[i]; \ arr[i] = arr[n - i - 1]; \ arr[n - i - 1] = __t; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249246/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249246/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> double time (int a, int b, int x, int y, int v){ double xa = x - a; double yb = y - b; return sqrt(xa*xa + yb * yb)/v; } int main(){ int a, b, n, x, y, v, i; double min = 2e31, t; scanf("%d %d", &a, &b); scanf("%d", &n); for (i = 0; i < n; i++){ scanf("%d %d %d", &x,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24929/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24929/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <stdlib.h> #include <math.h> typedef struct{ double x, y, v; double time; }coordenadas; int main(){ int i, aux; double final, aux2, aux3, aux4, a, b; coordenadas * indices; scanf("%lf %lf", &a, &b); scanf("%d", &aux); indices =malloc(aux*sizeof(coordenadas)); for(i=0; i < aux;i++){...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_24934/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_24934/source.c" target datalayout = "e-m:e-p270: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.coordenadas = type { ...
#include <stdio.h> #include <string.h> #define LEN_MAX 80 #define LEN_MAX1 (LEN_MAX+1) #define NMAX 20 void remove_feed(char *text); void decode(char *input,char *output); char shift(char in); int check_decoded(char *text); int main(){ int n=0; char input[LEN_MAX1], output[LEN_MAX1]; while(fgets(input,sizeo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249398/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249398/source.c" target datalayout = "e-m:e-p270: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> #define MAX 80 int main() { int i,j=97; char str[MAX]; char str1[MAX]; char arr[26]; for (i = 0; i < 26; i++) { arr[i] = j; ++j; } i = 1; while (fgets(str1,81,stdin)!=NULL) { //printf("%s",str); //printf("%s",str1); while (1) { int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249534/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249534/source.c" target datalayout = "e-m:e-p270: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> typedef struct element_{ int h, p, q; } element; void elem_copy(element* src, element* dst) { src->h = dst->h; src->p = dst->p; src->q = dst->q; } int main(void) { int n, m, a, i, j; int line[105]; element elem[1001]; element e; int t; while(scanf("%d %d %d\n", &n, &m, &a)==3) { if(n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249578/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249578/source.c" target datalayout = "e-m:e-p270: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.element_ = type { i...
#include <time.h> #include <stdio.h> #include <stdlib.h> int main() { int n, i, minb, maxa; int a[100000], b[10000]; scanf("%d", &n); for (i = 0; i < n; i++){ scanf("%d %d", &a[i], &b[i]); if (i == 0){ minb = b[i]; maxa = a[i]; } else{ if (maxa < a[i]){ minb = b[i]; maxa = a[i]; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249620/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249620/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 1345: Bit String Reordering // 2017.12.4 bal4u@uu #include <stdio.h> #define INF 1000 int b[16]; int zero[16], one[16]; int swap(int *a, int goal, int fr, int to) { int i; for (i = fr+1; i < to; i++) { if (a[i] == goal) { a[i] = a[fr], a[fr] = goal; return i - fr; } } return INF; } int main() { int ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249671/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249671/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 abs(x) (((x)>0)?(x):-(x)) int main() { int i, j, k, n; scanf("%d %d", &n, &k); int h[n+k]; int cost[n+k]; for (i=0; i<n; i++) scanf("%d", &h[i]); for (; i<n+k; i++) { h[i] = h[n-1]; cost[i] = 0; } for (i=n-1; i>=0; i--) { for (j=k; j>0; j--) { if (j==k...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249714/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249714/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 min(int a,int b){ if(a>b) return b; else return a; } int abs(int a){ if(a>0) return a; else return -1*a; } int main(void) { int n; int k; int x=0; int tmp = 0; scanf("%d%d",&n,&k); int dp[n]; int cost[n]; for(int i=0;i<n;i++){ scanf("%d",&cost[i]); } dp[0] = 0; dp[1] = abs(c...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249808/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249808/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 MIN(int a,int b){return a<b?a:b;} int main(){ int n,m,i,j,h[100010],d[100010]={}; scanf("%d %d",&n,&m); for(i=0;i<n;i++)scanf("%d",&h[i]); for(i=1;i<n;i++)d[i]=1e9; for(i=0;i<n;i++){ for(j=0;j<m&&i+j+1<n;j++)d[i+j+1]=MIN(d[i+j+1],d[i]+abs(h[i]-h[i+j+1])); } pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249851/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249851/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(){ double x1,x2; double y1,y2; scanf("%lf %lf",&x1,&y1); scanf("%lf %lf",&x2,&y2); x1-=x2; y1-=y2; printf("%lf\n",sqrt(x1*x1+y1*y1)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249901/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249901/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(){ double x1,x2; double y1,y2; scanf("%lf %lf",&x1,&y1); scanf("%lf %lf",&x2,&y2); x1-=x2; y1-=y2; printf("%lf\n",sqrt(x1*x1+y1*y1)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249945/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249945/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { // your code goes here double x1,y1; double x2,y2; double d; scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2); d = pow((x1-x2),2)+pow((y1-y2),2); d = sqrt(d); printf("%f",d); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_249996/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_249996/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> int main(void){ double x1,y1; double x2,y2; double distance; scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2); distance=sqrt(pow(x2-x1,2)+pow(y2-y1,2)); printf("%.8f\n",distance); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250037/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250037/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> int main(void){ double x1,y1,x2,y2,d; scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2); d=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)); printf("%lf\n",d); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250080/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250080/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> int main(void) { double x1, y1, x2, y2; scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2); printf("%lf\n", sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2))); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250123/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250123/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> int main(void){ double x1,y1,x2,y2,xkyo,ykyo,alkyo=0; scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2); xkyo=pow(x2-x1,2); ykyo=pow(y2-y1,2); alkyo=sqrt(xkyo+ykyo); printf("%lf\n",alkyo); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250174/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250174/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include<math.h> int main(void){ double x1,x2,y1,y2, a; scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2); a=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2); a=sqrt(a); printf("%f", a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250217/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250217/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> int main(void){ double x1,y1,x2,y2; scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2); printf("%f\n",sqrt(pow(x2-x1,2) + pow(y2-y1,2)) ); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250268/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250268/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> int main (void) { double x1,x2,y1,y2; scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2); printf("%lf",sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250310/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250310/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <math.h> int main(void) { double x1 = 0; double y1 = 0; double x2 = 0; double y2 = 0; scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2); double result = sqrt(pow(fabs(x1 - x2),2) + pow(fabs(y1 - y2),2)); printf("%lf", result); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250354/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250354/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() { double x1, y1, x2, y2; scanf("%lf%lf%lf%lf", &x1, &y1, &x2, &y2); printf("%.8lf\n", hypot(x1-x2, y1-y2)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250398/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250398/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> int main(void) { double x1; double x2; double y1; double y2; //座標を入力する scanf("%lf%lf%lf%lf", &x1, &y1, &x2, &y2); //結果を出力する printf("%lf\n", sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2))); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250440/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250440/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(){ double x, y, x1, y1, x2, y2; scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2); x = x2 - x1; y = y2 - y1; printf("%f\n", sqrt(x * x + y * y)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250484/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250484/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 kukan[10], a1, a2, sum, i, sure, surea; while(scanf( "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", &kukan[0], &kukan[1], &kukan[2], &kukan[3], &kukan[4], &kukan[5], &kukan[6], &kukan[7], &kukan[8], &kukan[9], &a1, &a2) != EOF) { sum = 0; fo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250534/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250534/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(int argc,char* argv[]){ int len[10]; int v_1,v_2,i; int sum; double time; while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&len[0],&len[1],&len[2],&len[3],&len[4],&len[5],&len[6],&len[7],&len[8],&len[9],&v_1,&v_2) != EOF){ sum = 0; for(i = 0;i < 10;i++){ sum += len...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250585/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250585/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[10]; int sum; int v[2]; int i, j; float time; while (scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", a, a+1, a+2, a+3, a+4, a+5, a+6, a+7, a+8, a+9, v, v+1) != EOF){ sum = 0; for (i = 0; i < 10; i++){ sum += a[i]; } time = 0; for (i = 0; i < 10; i++){ s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250628/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250628/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#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_250679/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250679/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,num; scanf("%d",&n); int *a = calloc(n,sizeof(int)); for(int x = 1;x < n;x++) { for(int y = 1;y < n;y++) for(int z = 1;(num = x * x + y * y + z * z + x * y + x * z + y * z) <= n;z++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250729/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250729/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> typedef long long ll; int main() { int n; scanf("%d", &n); ll ans[10000] = {0}; for (int x = 1; x <= n; x++) { for (int y = 1; y <= n; y++) { for (int z = 1; z <= n; z++) { int t = x * x + y * y + z * z + x * y + y * z + z * x; if (t <= n) { ans[t - 1]++; } else { break...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250772/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250772/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int b; int ab; int i; while((scanf("%d %d",&a,&b))!=EOF){ ab=a+b; for(i=1;;i++){ ab/=10; if(ab==0) break; } printf("%d\n",i); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250815/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250815/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,sum; while(scanf("%d %d", &a, &b) != -1){ sum = a+b; int i = 1; while(sum/10 != 0){ sum = sum/10; i++; } printf("%d\n",i); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250859/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250859/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 DATA 200 int main(){ int a[DATA],b[DATA],c[DATA]; int i,j,keta=0; j=0; while(scanf("%d %d",&a[j],&b[j]) != EOF) j++; for(i=0;i<j;i++){ c[i]=a[i]+b[i]; while(c[i]>0){ c[i]/=10; keta++; } printf("%d\n",keta); keta=0; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250901/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250901/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, mas, count = 0; while(scanf("%d",&a) != EOF) { count = 0; scanf("%d",&b); mas = a + b; while(mas != 0) { mas = mas / 10; count++; } printf("%d\n",count); } return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250945/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250945/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,sum,counter,i; while(scanf("%d %d",&a,&b) != -1){ sum = a + b; for (i=0; sum!=0; i++) sum = sum / 10; printf("%d\n",i); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250989/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250989/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a,b; int r = 0; while(scanf("%d %d",&a,&b) != EOF){ a += b; while(a >0){ r++; a /= 10; } printf("%d\n",r); r = 0; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251038/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251038/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int x,y,sum,num; while(scanf("%d %d", &x, &y) != EOF){ num=x+y; sum=0; while(num!=0){ num/=10; sum++; } printf("%d\n", sum); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251081/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251081/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,n,count; while(scanf("%d%d",&a,&b)!=EOF){ if(a>=0&&b>=0){ n=a+b; count=0; while(n!=0){ n=n/10; count++; } printf("%d\n",count); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251124/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251124/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,sum; int i; while(scanf("%d %d",&a,&b)!=EOF){ sum=a+b; for(i=0;sum!=0;i++){ sum/=10; } printf("%d\n",i); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251168/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251168/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 0002: Digit Number // 2017.7.28 #include <stdio.h> #include <ctype.h> #include <stdlib.h> #define MAX 8 int max[MAX] = { 0, 0, 10, 100, 1000, 10000, 100000, 1000000 }; int main() { int a, b, c; int i; while (scanf("%d%d", &a, &b) == 2) { c = a + b; for (i = MAX - 1; i >= 0; i--) { if ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251218/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251218/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @max = dso_local local_unna...
#include<stdio.h> int keta(int a,int b); int main(void){ int a,b; while(scanf("%d %d",&a,&b) != EOF){ printf("%d\n",keta(a,b)); } return 0; } int keta(int a,int b){ int wa,sum,count=0; sum=a+b; for(wa=1;sum/wa!=0;wa*=10){ if(sum/wa!=0) count++; } return count; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251269/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251269/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int tem; int i; while( scanf("%d %d",&a,&b) !=EOF){ c = a+b; tem=0; i=1000000; while(i>=10){ if(c>=i){ tem+=1; } i/=10; } printf("%d\n",tem+1); t...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251311/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251311/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 Volume 0 Problem 0002 #include <stdio.h> int main(void) { int i; int num, num1, num2; int digits; while (scanf("%d%d", &num1, &num2) != EOF){ num = num1 + num2; digits = 0; while (num != 0){ num /= 10; digits++; } printf("%d\n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251405/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251405/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,sum,keta = 0; while (scanf("%d %d",&a,&b) == 2) { sum = a + b; while(sum>0){ keta++; sum/=10; } printf("%d\n",keta); sum = 0; keta = 0; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251470/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251470/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,count; while(scanf("%d %d",&a,&b)!=EOF){ c=a+b; count=1; while(c>=10){ c/=10; count++; } printf("%d\n",count); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251513/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251513/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,add,cnt=0; while(scanf("%d%d",&a,&b)!=EOF){ add=a+b; for(cnt=0; add!=0; add/=10) cnt++; printf("%d\n",cnt); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251564/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251564/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x,y,len; char digit[100]; while(scanf("%d %d",&x,&y) != EOF){ sprintf(digit, "%d", x+y); len = strlen(digit); printf("%d\n",len); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251614/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251614/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() { unsigned int a = 0; unsigned int b = 0; unsigned int len = 0; char buff[8] = {0}; while ( scanf("%d %d", &a, &b) != EOF ) { len = sprintf(buff,"%d", a+b); printf("%d\n", len); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251658/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251658/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a, b; int di; int counter = 0; int i; while (scanf("%d %d",&a ,&b) != EOF) { di = a + b; for (i = 0; i < 8; i++) { di /= 10; if (di == 0 && counter == 0) { printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251708/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251708/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, sum, d; while (scanf("%d %d", &a, &b) > 0) { sum = a + b; d = 0; do { sum /= 10; d++; } while (sum > 0); printf("%d\n", d); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251751/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251751/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { while(1){ int a=0,b=0; int sum=0; int count=1; scanf("%d %d", &a, &b); sum = a+b; if(a==0&&b==0) break; while(sum/10 != 0){ sum/=10; count++; } printf("%d\n" ,count); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251795/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251795/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main() { int a, b, c; int digit; for (int i = 0;i < 200; i++) { if (scanf("%d %d", &a, &b) != 2) { break; } c = a + b; digit = 0; for (;;){ if (c % 10 != 0) { digit++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251845/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251845/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> struct Process { char name[11]; int tim; }; struct Process dequeue(struct Process *Q,int *head) { *head = *head + 1; return Q[*head - 1]; } void enqueue(struct Process x,struct Process *Q,int *tail) { Q[*tail] = x; *tail +=1; } int main() { int n,c,cn...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251889/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251889/source.c" target datalayout = "e-m:e-p270: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.Process = type { [1...
#include <stdio.h> typedef struct{ char name[10]; int time; } P; int main(void){ int n,q,head,tail,i,t,x; P pro[100000]; scanf("%d %d",&n,&q); for(i=0;i<n;i++){ scanf("%s %d",pro[i].name,&pro[i].time); } head = 0; tail = n; t = 0; while(head != tail){ x = pro[head].time - q; i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251939/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251939/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.P = type { [10 x i8...
#include <stdio.h> #define NAME_LEN 20 #define MAX 100000 typedef struct { char name[NAME_LEN]; int time; } Process; Process a[MAX]; int top, first; void push(Process p) { top = (top + 1) % MAX; a[top] = p; } Process pop(void) { Process tmp = a[first]; first = (first + 1) % MAX; return tmp; } int main(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251997/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251997/source.c" target datalayout = "e-m:e-p270: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.Process = type { [2...
#include <stdio.h> #include <string.h> #define LEN 100000 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; void enqueue(P x); P dequeue(); int head, tail, n; int min(int a, int b) {return a < b ? a : b;} int main(){ int c, i, q; int col = 0; P u; scanf("%d %d", &n, &q); for (i = 1; i <...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252046/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252046/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.pp = type { [100 x ...
#include<stdio.h> #include<string.h> #include<stdlib.h> int main() { int t,x,i,j,k,p,f,a,b; char n[1000]; scanf("%d",&t); while(t--) { scanf("%s",n); x=strlen(n); f=0; k=0; a=0; b=0; for(i=0;i<x;i++) { if(n[i]=='?') { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25209/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25209/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 100000 typedef struct pp{ char name[100]; int t; }Trump; int h, sh, n, c=0, q; Trump Q[N]; void mes(){ Q[h].t = Q[h].t -q; Q[sh] = Q[h]; if(sh > n+1) sh = 0; else sh++; } int main(){ int i; scanf("%d %d", &n, &q); for ( i = 1; i <= n; i++){ scanf("%s", Q[i]....
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252132/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252132/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.pp = type { [100 x ...
#include <stdio.h> #include <string.h> #define LEN 100005 typedef struct pp { char name[100]; int t; } P; P Q[LEN]; int head, tail; void enqueue(P x) { Q[tail] = x; tail = (tail + 1) % LEN; } P dequeue() { P x = Q[head]; head = (head + 1) % LEN; return x; } int main() { int i, q, n, LANtime = 0; P u; s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252176/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252176/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.pp = type { [100 x ...
#include<stdio.h> #include<string.h> #define LONG 100005 typedef struct po { char name[100]; int time; }P; P Que[LONG]; int head,tail,n; P deque() { P x =Que[head]; head=(head+1)%LONG; return x; } void enqu(P x) { Que[tail]=x; tail = (tail + 1)%LONG; } int min(int a,int b) { return a<b ?a:b; } int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252219/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252219/source.c" target datalayout = "e-m:e-p270: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.po = type { [100 x ...
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25227/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25227/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; void enqueue(P ); P dequeue(void); int calc(int,int); int main(){ int e=0,c; int i,q; P u; scanf("%d %d\n", &n, &q); for ( i = 1; i <= n; i++){ scanf("%s", Q[i].nam...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252312/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252312/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.pp = type { [100 x ...
#include<stdio.h> #include<string.h> #define LEN 100000 typedef struct p{ char name[100]; int time; } P; P Q[LEN]; int head, tail, n; void enqueue(P x){ Q[tail] = x; tail = (tail+1) % LEN; } P dequeue(){ P x = Q[head]; head = (head+1) % LEN; return x; } int min(int a, int b){ return a < b ? a : b; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252363/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252363/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.p = type { [100 x i...
#include <stdio.h> #include <stdlib.h> #define MAX_PROCESSES 100000 typedef struct { char name[16]; int time; } Process; Process *queue[MAX_PROCESSES]; int p = 0, q = 0; void push(Process *proc) { queue[p++] = proc; if (p >= MAX_PROCESSES) p = 0; } Process *unshift() { Process *proc = queue[q++]; if (q...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252406/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252406/source.c" target datalayout = "e-m:e-p270: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.Process = type { [1...
#include<stdio.h> #include<string.h> #define LEN 1000000 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int main(){ int n, i, q, sum =0, last, cnt=0; scanf("%d %d", &n, &q); for ( i = 1; i <= n; i++){ scanf("%s", Q[i].name); scanf("%d", &Q[i].t); } i = 1; last = n; while(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252493/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252493/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.pp = type { [100 x ...
#include <stdio.h> #include <string.h> //#include <stdlib.h> #define N 100005 typedef struct pp{ char name[100]; int t; } P; P Q[N]; int head,tail,n; void enqueue(P x){ Q[tail] = x; tail = (tail + 1) % N; } P dequeue(){ P x = Q[head]; head = (head +1) % N; return x; } int min(int a,int b){ return a < b...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252543/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252543/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.pp = type { [100 x ...
#include<stdio.h> #include<string.h> #define N_MAX 100005 #define len 10 typedef struct task{ char name[len]; int time; }T; int main(void){ int i,n,q,take=0,head,tail; T Q[N_MAX]; scanf("%d %d",&n,&q);//入力 for(i=1;i<=n;i++){ scanf("%s",Q[i].name); scanf("%d",&Q[i].time); } head=1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252587/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252587/source.c" target datalayout = "e-m:e-p270: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.task = type { [10 x...
#include<stdio.h> #include<stdlib.h> #define ll long long int int cmpfnc(const void * a, const void * b) { return ( *(int*)b - *(int*)a ); } int min(int a,int b) { if(a<b) return a; return b; } int main() { int n,f ; scanf("%d %d",&n,&f); int i; int arr[100005]; ll total = 0 ; for(i=0;i<n;i++) { in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25263/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25263/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <string.h> struct Process{ char name[100]; int t; }; struct Process Q[1001]; int n; void enqueue(struct Process x){ struct Process S; int i; S = x; for(i = 0 ; i < n ; i++){ if(i == n-1){ Q[i] = S; } else { Q[i] = Q[i+1]; } } } struct Process deque...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252688/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252688/source.c" target datalayout = "e-m:e-p270: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.Process = type { [1...
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head=0, tail=0, n=0; void enqueue(P x){ Q[tail]=x; tail=tail+1; tail=tail%(LEN+1); } P dequeue(){ int l; l=head; head=head+1; head=head%(LEN+1); return Q[l]; } int main(){ i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252730/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252730/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.pp = type { [100 x ...
#include <stdio.h> #include <string.h> #define LEN 100005 typedef struct pp { char name[100]; int t; } P; P Q[LEN]; int head, tail, n; void enqueue(P x) { Q[tail] = x; tail = (tail + 1) % LEN; } P dequeue() { P x = Q[head]; head = (head + 1) % LEN; return x; } int min(int a,int b) { return a <...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252774/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252774/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.pp = type { [100 x ...
#include <stdio.h> #include <string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; } P; P Q[LEN]; int head, tail, n; void enqueue(P x){ Q[tail] = x; tail = (tail + 1) % LEN; } P dequeue(void){ P x = Q[head]; head = (head + 1) % LEN; return x; } int min(int a,int b){ return a < b ? a :...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252817/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252817/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.pp = type { [100 x ...
#include <stdio.h> typedef struct pp{ char name[100]; int t; }P; P Q[100001+1]; int head, tail, n; void enqueue(P x){ Q[tail] = x; tail++; tail = tail % 100001; } P dequeue(){ P ret; ret = Q[head]; head++; head = head % 100001; return ret; } int main(){ int elaps = 0, c , zan; int i, q; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252860/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252860/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.pp = type { [100 x ...
#include<stdio.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; int head, tail, n; P Q[LEN]; void enqueue(P x){ Q[tail]=x; tail=(tail+1)%LEN; } P dequeue(){ P x=Q[head]; head=(head+1)%LEN; return x; } int min(int a, int b){ if(a<b)return a; else return b; } int main(){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252903/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252903/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.pp = type { [100 x ...
#include <stdio.h> #include <stdlib.h> #define MAX 100000 typedef struct{ char name[10]; int time; } PROCESS; int isEmpty(PROCESS *); int isFull(PROCESS *); void enqueue(PROCESS *, PROCESS); PROCESS dequeue(PROCESS *); void rrs(PROCESS *, int); int head=0, tail=0; int main(){ int n, q, a, total_time=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252947/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252947/source.c" target datalayout = "e-m:e-p270: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.PROCESS = type { [1...
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; int compare( int a, int tai){ return a < tai ? a : tai; } void enqueue(P x){ Q[tail] = x; tail = ( tail + 1 ) % LEN; } P dequeue(){ P y = Q[head]; head = ( hea...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252990/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252990/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.pp = type { [100 x ...
#include<stdio.h> #include<stdlib.h> #define N 100000 //node pointer typedef struct DATA{ char name[11]; int time; }DATA; //prototype void enqueue(DATA); DATA *dequeue(void); //Queue set DATA Queue[N]; //head & tail & data number set int head=0, tail=0, num; int main(){ int Q, i; DATA *data; //create *...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253032/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253032/source.c" target datalayout = "e-m:e-p270: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.DATA = type { [11 x...
#include <stdio.h> #include <string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN]; int head, tail, n; void enqueue(P x) { Q[tail] = x; tail = (tail + 1) % LEN; } P dequeue() { P x = Q[head]; head = (head + 1) % LEN; return x; } int min(int a, int b) {return a<b ? a : b;} ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253083/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253083/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.pp = type { [100 x ...
#include <stdio.h> #include <assert.h> #include <stdlib.h> #include <string.h> #define NAME_MAX 10 struct process { struct process* next; char name[NAME_MAX + 1]; int time; }; struct process_queue { struct process* head; struct process* tail; int count; }; static void enqueue(struct process...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253126/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253126/source.c" target datalayout = "e-m:e-p270: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.process = type { pt...
#include <stdio.h> #include <stdlib.h> #include <string.h> long long n, p, m, k, l, t, i, j, k, q, a[1000000], c, d, x, y, b, g, w, e; char s[1000000]; int war(const void* aa, const void* bb) { return(*(long long*)bb-*(long long*)aa); } /* long long bins(long long p, long long k, long long s) { if(a[(p+k)/2]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25317/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25317/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 LEN 100005 typedef struct{ char name[10]; int t; }P; int head,tail,n; P Q[LEN]; P dequeue() { P x; x=Q[head]; head=(head+1)%LEN; /*リングバッファで一周したら先頭に戻る*/ return x; } int min(int a,int b) { if(a<b) { return a; } else { return b; } } void enqueue(P x) { Q[tail]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253212/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253212/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.P = type { [10 x i8...
#include<stdio.h> #include<string.h> #define LEN 100000 typedef struct { char name[100]; int t; }P; P Q[LEN]; int head,tail,n; void enqueue(P x){ Q[tail]=x; tail=(1+tail)%LEN; } P dequeue(){ P x=Q[head]; head=(head+1)%LEN; return x; } int min(int a,int b){ if(a>b) return b; els...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253256/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253256/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.P = type { [100 x i...