Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> int main(){ char s[4]; scanf("%s",s); for(int i=0;i<3;i++){ if(s[i]==s[i+1]){ printf("Bad\n"); return 0; } } printf("Good\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234087/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234087/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 pal(char s[10001], int n){ int i,pal=1; for(i=0;i<n;i++) if (s[i]!=s[n-i-1]) pal=0; return pal; } int main(){ int t; char s[10002];fgets(s, 10002, stdin); scanf("%d", &t); int i, ini=0, cnt=0; int pali=1; if ((strlen(s)-1)%t!=0) { puts("NO"); return 0 ; } c...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23413/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23413/source.c" target datalayout = "e-m:e-p270: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_unnam...
#include <stdio.h> #include <stdlib.h> #include <string.h> #define ll long long #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k)) #define INF ((1LL<<62)-(1LL<<31)) #define max(p,q)((p)>(q)?(p):(q)) #define min(p,q)((p)<(q)?(p):(q)) #define bit(n,m)(((n)>>(m))&1) int upll(const vo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234173/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234173/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 int X; scanf("%lld", &X); long long int i; long long kake = 0; for(i = 0; i < 1000000000; i++){ kake = i * (i + 1); if(2 * X <= kake){ break; } } printf("%lld\n", i); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234216/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234216/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int t; scanf("%d", &t); while(t--){ int n; scanf("%d", &n); int a=0; if(n>0){ a=1; } if(n>10){ a=3; } if(n>100){ a=6; } if(n>1000){ a=10; } printf("%d\n", ((n%10)-1)*10+a); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23426/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23426/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef long long ll; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define max(l,r) ((l)>(r)?(l):(r)) #define min(l,r) ((l)<(r)?(l):(r)) #define chmax(l,r) (l=max(l,(r))) #define chmin(l,r) (l=min(l,(r))) const ll MOD = 1000000007; const int INF = (1 << 30); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23431/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23431/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @MOD = dso_local local_unname...
#include<stdio.h> int main(){ int a[3], b[3]; int i; for(i = 0; i < 3; i++){ scanf("%d %d", &a[i], &b[i]); } int c = 0; int k[4] = {}; for(i = 0; i < 3; i++){ k[a[i]-1]++; k[b[i]-1]++; } int d = 0; for(i = 0; i < 4; i++){ if(k[i] == 1) d++; else if(k[i] == 2) c++; } i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234353/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234353/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 DOT(v1, v2) (v1.x * v2.x + v1.y * v2.y) #define CROSS(v1, v2) (v1.x * v2.y - v1.y * v2.x) #define NORM(v) (v.x * v.x + v.y * v.y) typedef struct { double x, y; } point_t; typedef point_t vector_t; typedef struct { point_t p0, p1; } segment_t; typedef segment_t line_t; static vector_t plus(v...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234403/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234403/source.c" target datalayout = "e-m:e-p270: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.segment_t = type { ...
#include<stdio.h> #define rep(i,n) for(int i=0;(i)<(n);(i)++) int n,m; int a[2000000],b[2000000]; int main(void){ while(1){ scanf("%d%d",&n,&m); if(n+m==0) break; for(int i=0;i<2000000;i++)a[i]=b[i]=0; int h[2000]={0},w[2000]={0}; for(int i=1;i<=n;i++){ scanf("%d"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234447/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234447/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 loop; int flag = 0; int ans = 0; char s[200001]; int len; scanf("%s", s); len = strlen(s); for (loop = 0; loop < len; loop++) { if (flag == 0 && s[loop] == 'T')ans++; else if (s[loop] == 'S')flag++; else flag--; } printf("%d\n", 2 * ans); return ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234504/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234504/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <string.h> int main() { long long int n, m, x, ans = 1000000000000; scanf("%lld %lld %lld", &n, &m, &x); long long int book[n + 1][m + 1], C[n + 1]; long long int money, i, j, k, l, skill[m + 1]; int ok; for (l = 0; l < m; l++) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234548/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234548/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 rep(i,n)for(int i=0;i<(int)(n);i++) int main(){ int n,m,x,c[12]={0},a[12][12]={0},y,z[12],b,d=2e9; scanf("%d%d%d",&n,&m,&x); rep(i,n){ scanf("%d",&c[i]); rep(j,m){ scanf("%d",&a[i][j]); } } rep(i,2){rep(j,2){rep(k,2){rep(l,2){rep(o,2){rep(p,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234591/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234591/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n,m; long x; scanf("%d %d %ld", &n, &m, &x); long c[n],a[n][m]; for (int i = 0; i < n; i++) { scanf("%ld", &c[i]); for (int j = 0; j < m; j++) { scanf("%ld", &a[i][j]); } } int bit[n]; for (int i = 0; i < n; i++) { bit[i] =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234634/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234634/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 cmp(const void *a, const void *b) { return *(int*)b - *(int*)a; } int main(void) { int n,t,s; scanf("%d",&n); int a[n]; for (int i = 0; i < n; i++) { scanf("%d",&a[i]); } qsort(a,n,sizeof(int),cmp); t = s = a[0]; int tmp = (t+1) / 2; int min = 1e9; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234685/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234685/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 main(){ int N,A[80]; long long G =1000,a = 0; scanf("%d",&N); for(int i = 0;i < N;i++){ scanf("%d",A+i); } for(int i = 0;i < N-1;i++){ if(A[i] < A[i+1]){ a = G/A[i]; G = G%A[i]; G = G + a*A[i+1]; a = 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234735/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234735/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,d[100010],k,i,m=1000; scanf("%lld",&n); for(i=0;i<n;i++)scanf("%lld",&d[i]); for(i=1;i<n;i++){ if(d[i-1]<d[i]){ k=m/d[i-1]; m=m-k*d[i-1]; m+=d[i]*k; } } printf("%lld\n",m); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234779/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234779/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){ long n,p; scanf("%ld %ld", &n, &p); if (n == 1) { printf("%ld\n", p); return 0; } long max = 1; long divisor; for (int i = 2; pow(i,n) <= p; i++) { divisor = pow(i,n); if (p%divisor == 0) { max = i; } } printf("%ld\n", ma...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234821/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234821/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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=0; float prob=0.0; scanf("%d",&n); prob=(float)(n/2+n%2)/(float)n; printf("%.7f",prob); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234872/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234872/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); printf("%lf",(double)(n/2+n%2)/n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234915/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234915/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int n; double ans; scanf("%d", &n); if(n%2==0){ ans=0.5; }else{ ans=(double)(n/2+1)/n; } printf("%.7f\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234959/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234959/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { double N; double count=0; double p; int i; scanf("%lf",&N); for(i=N;i>=1;i--) { if(i%2!=0) count++; } p=count/N; printf("%lf",p); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235000/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235000/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int N; double n,ans; scanf("%d",&N); n = N; if ( N%2==0){ ans = n/2/n; } else{ ans = (n/2 +0.5)/n; } printf("%lf",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235044/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235044/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int n,i,j=0; double g; scanf("%d",&n); for(i=1;i<=n;i++){ if(i%2==1) j++; } g=n; printf("%.10lf",j/g); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235088/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235088/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 input, output; if (scanf("%d", &input) == 1) { if(input < 1 || input > 100) return -1; output = (input + 1)/2; printf("%.10f\n", output/(double)input); return 0; } else { printf("Failed to read integer.\n"); return -1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235130/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235130/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int count = 0; scanf("%d",&N); for(i = 1 ; i <= N ; i++){ if(i%2 == 1){ count++; } } printf("%lf\n",(double)count/N); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235174/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235174/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; double ans; double num; scanf("%d",&a); if(a%2==0){ ans=0.50000000000; }else{ num=(a+1)/2; ans=num/a; } printf("%lf",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235217/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235217/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N; double ans ; scanf("%lf",&N); if(fmod(N,2)==0) ans = 1/2.; else ans = (int)(N/2+1)/N; printf("%lf\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235260/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235260/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include<string.h> int main( void ) { int N, tmp; double ans; scanf("%d", &N); tmp = (N+1) / 2; ans = (double)tmp / (double)N; printf("%lf", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235303/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235303/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> typedef long long int ll; long long int N, dn[3003][3003], a[3003]; ll mx(ll a, ll b){ return (a > b ? a : b); } ll dp(int start, int end){ if(start > end) return 0; if(dn[start][end] != -1) return dn[start][end]; ll p1 = a[start] - dp(start+1, end), p2 = a[end] - d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235347/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235347/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @dn = dso_local local_unnam...
// AOJ 2473 Poor Computer // 2018.2.1 bal4u #include <stdio.h> #include <string.h> #define HSIZ 12007 long long hash[HSIZ+5], *hashend = hash + HSIZ; int lookup(long long n) { long long *p = hash + (int)(n % HSIZ); while (*p) { if (*p == n) return 0; if (++p == hashend) p = hash; } *p = n; return 1; } #def...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235398/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235398/source.c" target datalayout = "e-m:e-p270: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.Q = type { i64, i32...
#include<stdio.h> int main() { long int hgt( long int); long int N; scanf("%ld",&N); printf("%lld\n",hgt(N)); } long int hgt(long int N) { long long h=0; long int arr[N]; for(int i=0;i<N;i++) scanf("%ld",&arr[i]); for(int i=0; i<=N-2;i++) { if(arr[i+1]<arr[i]) { h+=(arr[i]-arr[i+1]); arr[i+1]=ar...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235448/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235448/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&a); int t=0,i; //long int b[a],k=0; long int b[200000],k=0; //int b[1500000],k=0; for(i=0;i<a;i++){ scanf("%ld",&b[i]); if(t<b[i]) t=b[i]; else k+=t-b[i]; } printf("%ld",k); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235499/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235499/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 people; scanf("%d", &people); long long height[people]; scanf("%lld", &height[0]); long long sum=0; for(int i=1;i<people;i++){ scanf("%lld", &height[i]); if(height[i-1]>height[i]){ sum+=(height[i-1]-height[i]); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235541/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235541/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; long long ans; scanf("%d", &N); long long *A; long long prev; A = malloc((1 + N) * sizeof(long long)); ans = 0; scanf("%lld", &A[1]); prev = A[1]; for (int i = 2; i <= N; i++) { scanf("%lld", &A[i]); if (A[i] < prev) ans += prev - A[i]; els...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235592/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235592/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> typedef long long ll; int main() { ll n; ll a[200005]; scanf("%lld", &n); for (ll i = 0; i < n; i++) { ll buf; scanf("%lld", &buf); a[i + 1] = buf; // 1 -- n } ll ans = 0; a[0] = a[1]; for (ll i = 1; i <= n; i++) { if (a[i] < a[i - 1]) { ll step = a[i - 1] - ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235635/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235635/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
//set many funcs template //Ver.20190820 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #include<assert.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235679/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235679/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.sd = type { i32, i3...
#include<stdio.h> int main() { int i, j, k; int n, m, h, w, g, a, b, c, d; int f = 0; char s[2100000]; scanf("%d %d %d %d %d", &n, &a, &b, &c, &d); scanf("%s", s); for (i = 0;i < n-1;i++) { if (s[i] == '#') { if (s[i + 1] == '#') { if (i > a-1) { if (i < c) { f = 1; } } if ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235721/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235721/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#if 0 cat <<EOF >mistaken-paste #endif // thx Ebi-chan! #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" #define _USE_MATH_DEFINES #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #include <time.h> #define BIG 2000000007 #define VERYBI...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235765/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235765/source.c" target datalayout = "e-m:e-p270: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.hwll = type { i64, ...
#include<stdio.h> int main() { int n; scanf("%d",&n); char s[n+1]; scanf("%s",s); int a=0; for(int i=0;i<n-2;i++) { if(s[i]=='A'&&s[i+1]=='B'&&s[i+2]=='C') { a++; i+=2; } } printf("%d\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235815/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235815/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,count=0,i; scanf("%d",&N); char S[N]; scanf("%s",S); for(i=0;i<=N-3;i++) { if(S[i]=='A'&&S[i+1]=='B'&&S[i+2]=='C') { count++; } } printf("%d",count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235859/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235859/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(void) { int n, c=0; char s[51]; scanf("%d%s", &n, s); for (int i=0; i<n-2; i++) { if (strncmp(s+i, "ABC", 3)==0) c++; } printf("%d\n", c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235901/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235901/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> int main (void) { int n; scanf("%d", &n); char s[n+1]; scanf("%s", s); int ans=0; char *head=s; while ( (head = strstr(head, "ABC")) ) { ans++; head = &head[2]; // head は "ABC" の先頭なので、その分後ろに移動 } printf("%...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235952/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235952/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char s[50]; scanf("%d %s", &n, s); int count = 0; for(int i=0; i<n; i++){ if(s[i] == 'A' && s[i+1] == 'B' && s[i+2] == 'C'){ count ++; } } printf("%d", count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236001/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236001/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,k,x,sum=0; int a[105]; scanf("%d %d %d",&n,&k,&x); for(int i=0;i<n;i++) { scanf("%d",&a[i]); } for(int i=0,j=n-1;i<k;i++,j--) { if(a[j]>x) a[j]=x; } for(int i=0;i<n;i++) { sum=sum+a[i]; } printf("%d\n",sum)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23606/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23606/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...
// AOJ 2069: Greedy, Greedy. // 2017.11.5 bal4u@uu #include <stdio.h> #include <string.h> int c[52], n; int greedy[10001]; int dp[10001]; int calcGreedy(int lim) { int v, p, i, k; memset(greedy, 0, sizeof(greedy)); for (v = lim; v >= 1; v--) { p = v; for (i = n - 1; i >= 0; i--) if (c[i] <= p) { k = p/c[i]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236117/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236117/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @greedy = dso_local local_u...
#include<stdio.h> int main(){ int A[3][10],B[3][10],C[3][10],D[3][10],i,j,n,b,f,r,v; for(i=0;i<3;i++){ for(j=0;j<10;j++){ A[i][j] = 0; B[i][j] = 0; C[i][j] = 0; D[i][j] = 0; } } scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d %d %d %d",&b,&f,&r,&v); if(b == 1) A[f-1][r-1]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236160/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236160/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int h,i,j,k,n,b,f,r,v,room[4+1][3+1][10+1]; scanf("%d",&n); for(i=1;i<=4;i++) { for(j=1;j<=3;j++) { for(k=1;k<=10;k++) { room[i][j][k]=0; } } } for(h=1;h<=n;h++) { scanf("%d %d %d %d",&b,&f,&r,&v); room[b][f][r]+=v; } for(i=1;i<=4;i++) { for(j=1;j<=3;j++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236203/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236203/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 house[4][3][10] = {}; int n,b,f,r,v; int i,j,k; scanf("%d",&n); for(i = 0; i < n; i++){ scanf("%d %d %d %d",&b,&f,&r,&v); house[b-1][f-1][r-1] += v; } for(i = 0; i < 4; i++){ for(j = 0; j < 3; j++){ for(k = 0; k < ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236247/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236247/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, k, m, n, b, f, r, v, tenant[4][3][10]; for(i=0;i<4;i++){ for(j=0;j<3;j++){ for(k=0;k<10;k++){ tenant[i][j][k] = 0; } } } scanf("%d\n", &n); for(m=0;m<n;m++){ scanf("%d %d %d %d", &b, &f, &r, &v); tenant[b-1][f-1][r-1] += v; } for(i=0;i<4;i++){ for(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236290/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236290/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i, j, k, b, f, r, v, total; unsigned char ar[4][3][10] = { { { 0 } } }; scanf("%d", &total); for (i = 0; i < total; i++) { scanf("%d %d %d %d", &b, &f, &r, &v); ar[b - 1][f - 1][r - 1] += v; } for (i = 0; i < 4; i++) { for (j = 0; j < 3; j++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236333/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236333/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int a[4][3][10]={0},i,j,k,f,s,n; scanf("%d\n",&n); for(f=0;f<n;f++){ scanf(" %d%d%d%d", &k,&i,&j,&s); a[k-1][i-1][j-1]+=s; } for(k=0;k<4;k++){ for(i=0;i<3;i++){ for(j=0;j<10;j++){ if(s<10 || 0<=s)printf(" %d",a[k][i][j]); } printf("\n"); }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236377/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236377/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 max(int p, int q) { return p>q?p:q; } int main() { int a,b,c,d; scanf("%d %d %d %d", &a, &b, &c, &d); if (max(3*a/10,a-a*c/250) < max(3*b/10, b-b*d/250)) printf("Vasya\n"); else if (max(3*a/10,a-a*c/250) == max(3*b/10, b-b*d/250)) pr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23642/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23642/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(){ int n, i, j; int b, f, r, v; int floor[10][3*4]; for( i=0; i<(3*4); i++ ){ for( j=0; j<10; j++ ){ floor[j][i] = 0; } } scanf( "%d", &n ); for( i=0; i<n; i++ ){ scanf( "%d %d %d %d", &b, &f, &r, &v ); floor[r-1][(3*(b-1))+f-1] += v; } for( i=0; i<(3*4); i++...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236463/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236463/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n, b, f, r, v; int i, j, k; int x[4][3][10]={0}; scanf("%d", &n); for (i=0; i<n; i++) { scanf("%d %d %d %d", &b, &f, &r, &v); x[b-1][f-1][r-1]+=v; } for (i=0; i<4; i++) { for (j=0; j<3; j...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236506/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236506/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,c,d; int p,t; scanf("%d%d%d%d",&a,&b,&c,&d); int m1,m2; if (3*a/10>=a-(a/250)*c) m1=3*a/10; else m1=a-(a/250)*c; if (3*b/10>=b-(b/250)*d) m2=3*b/10; else m2=b-(b/250)*d; if (m1>m2) printf("Misha"); else if (m1<m2) printf("Vasya"); else printf("Tie"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23655/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23655/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> int main(){ int a, b, c, d; int vasya, misha; while(scanf("%d%d%d%d", &a, &b, &c, &d) != EOF){ misha = 3*a/10 > a - a/250 * c ? 3*a/10 : a - a/250 * c; vasya = 3*b/10 > b - b/250 * d ? 3*b/10 : b - b/250 * d; if(vasya > misha) printf("Vasya\n"); else if(vas...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23660/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23660/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #include <math.h> int main(void){ int a[4][3][10]={0},n,i,j,k,b,f,r,v; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d %d %d %d",&b,&f,&r,&v); a[b-1][f-1][r-1]+=v; } for(i=0;i<4;i++){ for(j=0;j<3;j++){ for(k=0;k<10;k++){ printf("%2d",a[i][j][k]); } printf("\n")...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236643/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236643/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,num; int bnum, fnum, rnum; int v[4][3][10]; int b, f, r; for (b = 0; b < 4; b++) { for (f = 0; f < 3; f++) { for (r = 0; r < 10; r++) { v[b][f][r] = 0; } } } scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d %d", &bnum, &fnum, &rnum,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236687/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236687/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,pm,pv,t1,t2,t3,t4; scanf("%d%d%d%d",&a,&b,&c,&d); t1=(3*a)/10; t2=a-((a/250)*c); t3=(3*b)/10; t4=b-((b/250)*d); pm=(t1>t2)?t1:t2; pv=(t3>t4)?t3:t4; if(pm>pv) printf("Misha"); else if(pm==pv) printf("Tie"); else printf("Vasya"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23673/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23673/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> int main(){ int count[4][3][10]={{{0}}}; int i,j,k,n; int b,f,r,v; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d %d %d %d\n",&b,&f,&r,&v); count[b-1][f-1][r-1]+=v; } for(i=0;i<4;i++){ for(j=0;j<3;j++){ for(k=0;k<10;k++){ pr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236773/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236773/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 count[4][3][10] = {0}, b, f, r, v, n, i; scanf("%d", &n); for(i = 0; i < n; i++){ scanf("%d %d %d %d", &b, &f, &r, &v); count[b - 1][f - 1][r - 1] += v; } for(b = 0; b < 4; b++){ for(f = 0; f < 4; f++){ for(r = 0; r < 10; r++){ if(b == 3 && f == 3) break; if(b !...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236816/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236816/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 max(int a, int b){ if(a > b) return a; return b; } int main(){ int a = 0, b = 0, c = 0, d = 0; scanf("%d%d%d%d", &a, &b, &c, &d); // calculate points for misha int cost1 = 3 * a / 10; int cost2 = a - (a * c) / 250; int misha_score = max(cost1, cost2); // calculate points...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23686/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23686/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main() { int n; int p[4][3][10] = {0}; scanf("%d", &n); for (int i = 0; i < n; i++) { int b, f, r, v; scanf("%d %d %d %d", &b, &f, &r, &v); p[b - 1][f - 1][r - 1] += v; } for (int b = 0; b < 4; b++) { for (int f = 0; f < 3; f++) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236946/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236946/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 hotel[4][3][10],i,j,k,test,b,f,r,v; for(i=0;i<4;i++){ for(j=0;j<3;j++){ for(k=0;k<10;k++){ hotel[i][j][k]=0; } } } scanf("%d",&test); for(i=0;i<test;i++){ scanf("%d %d %d %d",&b,&f,&r,&v); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236997/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236997/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int n; scanf("%d",&n); int i; int a[12][10]={0}; int b,f,r,v; for(i=0;i<n;i++){ scanf("%d%d%d%d",&b,&f,&r,&v); a[3*b-(3-f)-1][r-1]+=v; } int j; for(i=0;i<12;i++){ if(i==3||i==6||i==9||i==12) printf("####################\n"); for(j=0;j<10;j++){ printf(" %d",a[i][j]); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237039/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237039/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 room[4][3][10]={{{0}}}; int n,b,f,r,v,i,j,k; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d %d %d %d",&b,&f,&r,&v); room[b-1][f-1][r-1]+=v; } for(i=0;i<4;i++){ for(j=0;j<3;j++){ for(k=0;k<10;k++){ printf(" %d",room[i][j][k]); } printf("\n"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237082/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237082/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a[4][3][10]={0}; int n, b, f, r, v; int i, j, k; scanf("%d", &n); for(i=0; i<n; i++) { scanf("%d %d %d %d", &b, &f, &r, &v); a[b-1][f-1][r-1]+=v; } for(i=0; i<4; i++) { for(j=0; j<3; j++) { for(k=0; k<10; k++) { printf("%2d", a[i][j][k]); } putchar('\n'...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237125/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237125/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x,count; scanf("%ld",&x); count = (x-x%11)/11; count *= 2; if(x%11 != 0)count++; if(x%11 > 6)count++; printf("%ld",count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237176/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237176/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 k; int i; int sum, record; while (scanf("%d", &k), k != 0) { sum = 0; for (i = 0; i < (k * (k - 1) / 2); i++) { scanf(" %d", &record); sum += record; } printf("%d\n", sum / (k - 1)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237233/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237233/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> int main( ) { long long int n,a=1234567,b=123456,i,j,k,c=1234,flag=0; scanf("%lld",&n); for(i=0;i<=100;i++) { for(j=0;j<=1000;j++) { if(((n-(a*i)-(b*j))>=0)&&((n-(a*i)-(b*j))%c==0)) { flag=1; } } } if(flag==1) { printf("YES\n"); } else { printf("NO\n")...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23732/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23732/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 25 #define NIL -1 typedef struct{ int parent; int left; int right; }Tree; Tree t[25]; int n; int Depth[25],Height[25]; int calHeight(int key); void calDepth(int key,int depth); int findsibling(int key); void print(void); int main(){ int i,j; int root,r,l,key; //in scanf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237363/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237363/source.c" target datalayout = "e-m:e-p270: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.Tree = type { i32, ...
#include <stdio.h> #define MAX 1000005 #define NIL -1 struct Node{ int p,l,r; }; struct Node tree[MAX]; int n,D[MAX],H[MAX]; int getSibling(int u){ if(tree[u].p==NIL){ return NIL; } if(tree[tree[u].p].l!=u && tree[tree[u].p].l!=NIL){ return tree[tree[u].p].l; } if(tree[tree[u].p].r!=u && tree[tree...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237406/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237406/source.c" target datalayout = "e-m:e-p270: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.Node = type { i32, ...
#include <stdio.h> #include <stdlib.h> #include <math.h> #define ROOT 0 #define INTERNAL 1 #define LEAF 2 struct node { int id; int deg; int height; struct node *parent; int depth; int type; int child_id[2]; struct node *child[2]; struct node *sibling; }; struct node *tree; void set_depth(struct n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237457/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237457/source.c" target datalayout = "e-m:e-p270: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.node = type { i32, ...
#include<stdio.h> #define MAX 100005 #define NIL -1 struct Node{ int p, l, r, t;}; struct Node T[MAX]; int n, H, D[MAX],h[MAX]; void getDepth(int u); int getheight(int u); void print(int u); int main(){ int i,d, v, c, l,r; scanf("%d", &n); for (i=0;i<n;i++){ T[i].p=T[i].l=T[i].r=NIL; } for(i=0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237514/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237514/source.c" target datalayout = "e-m:e-p270: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.Node = type { i32, ...
#include<stdio.h> #define MAX 10000 #define NIL -1 struct Node{ int p, l, r; }; struct Node A1[MAX]; int num; int A2[MAX], A3[MAX]; int getDepth(int m){ int d = 0; while(1){ m = A1[m].p; if ( m == NIL ) break; d++; } return d; } int getSibling(int m){ if ( A1[m].p == NIL ) return NIL; if (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237558/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237558/source.c" target datalayout = "e-m:e-p270: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.Node = type { i32, ...
/* * Binary Tree * output 1)node_number, 2)parent_number, 3)depth, 4)kind_of_node, 5)child_list */ /* inclution */ #include <stdio.h> /* Definition */ #define MAX 100000 #define NIL -1 /* Prototype */ void printTree(int); void setDepth(int, int); int setHeight(int); int getSibling(int); int getDegree(int); /* Glob...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237600/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237600/source.c" target datalayout = "e-m:e-p270: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.node = type { i32, ...
#include <stdio.h> #include <stdlib.h> typedef struct node{ int p; int left; int right; } Node; int searchHight(int); Node *node; int main(){ int n,i,id,depth,tmpP,deg,nowNode,sibling; scanf("%d", &n); node = malloc(sizeof(Node)*n); for (i = 0; i < n; ++i){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237651/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237651/source.c" target datalayout = "e-m:e-p270: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.node = type { i32, ...
#include <stdio.h> #define MAX 100005 #define R -1 typedef struct{ int parent; int right; int left; }Node; Node A[MAX]; int n; int B[MAX]; int C[MAX]; int height(int u){ int x1=0,x2=0; if(A[u].left!=R) x1=height(A[u].left)+1; if(A[u].right!=R) x2=height(A[u].right)+1; return C[u]=(x1>x2 ? x1:x2); } v...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237695/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237695/source.c" target datalayout = "e-m:e-p270: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.Node = type { i32, ...
#include<stdio.h> #define MAX 100000 #define NIL -1 struct node { int p, l, r, t; }; struct node T[MAX]; void depth(int); int height(int); void print(int); int n, H, D[MAX], h[MAX]; int main() { int i, d, v, c, l, r; scanf("%d", &n); for ( i = 0; i < n; i++ ) { T[i].p = NIL; T[i].l...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237738/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237738/source.c" target datalayout = "e-m:e-p270: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.node = type { i32, ...
#include<stdio.h> #define MAX 100005 #define NIL -1 typedef struct{ int parent, left, right; }Node; Node Tree[MAX]; int Depth[MAX]; int Height[MAX]; int degree[MAX]; int h; int getDepth(int); int getHeight(int); void print(int); int main(void){ int i, n; int vertex; int child[2]; scanf("%d", &n); fo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237781/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237781/source.c" target datalayout = "e-m:e-p270: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.Node = type { i32, ...
#include<stdio.h> #define NIL -1 #define MAX 10000 typedef struct{ int p; int l; int r; }Node; Node T[MAX]; int n,D[MAX],H[MAX]; void setD(int,int); int setH(int); int getS(int); void print(int); void setD(int u,int d) { if(u==NIL)return; D[u]=d; setD(T[u].l,d+1); setD(T[u].r,d+1); } int setH(int u) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237846/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237846/source.c" target datalayout = "e-m:e-p270: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.Node = type { i32, ...
#include <stdio.h> #include <stdlib.h> int main() { char str[10]; int n,rb,ra,flag=0; scanf("%d",&n); while(n--) { scanf("%s %d %d",str,&rb,&ra); if(rb>=2400 && ra>rb) { flag=1; } } if(flag==1) printf("YES"); else printf("NO"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23789/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23789/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> #include<stdlib.h> #define MAX 10000 int parent[MAX], left[MAX], right[MAX]; int n, D[MAX], H[MAX]; int getDepth(int u); void setDepth(int u, int p); int setHeight(int u); int setSibling(int u); void printChildren(int u); int main(){ int i, a, b, l, r; scanf("%d", &n); for(i = 0 ; i <...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237932/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237932/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 NIL -1 struct Node { int parent; int left; int right; }; struct Node T[MAX]; int n,D[MAX],H[MAX]; void setDepth(int u,int d){ if(u == NIL) return; D[u] = d; setDepth(T[u].left,d+1); setDepth(T[u].right,d+1); } int setHeight(int u){ int h1 =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237976/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237976/source.c" target datalayout = "e-m:e-p270: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.Node = type { i32, ...
#include <stdio.h> #include <stdlib.h> #define M -1 typedef struct{ int p; //親 int r; //左の子 int l; //右の子 }NODE; void GetDepth(NODE *,int,int,int *); int GetHeight(NODE *,int,int *); int GetSibling(NODE *,int); int main() { int n,i,num,left,right,t,depth[100],height[100],degree; NODE T[26]; scanf("%d",&n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_238018/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_238018/source.c" target datalayout = "e-m:e-p270: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.NODE = type { i32, ...
#include <stdio.h> #define MAX 10000 #define NIL -1 typedef struct { int parent, left, right;} Node; Node T[MAX]; int n, D[MAX], H[MAX]; void setDepth(int u,int d) { if(u == NIL) return; D[u] = d; setDepth(T[u].left, d+1); setDepth(T[u].right,d+1); } int setHeight(int u) { int h1 = 0, h2 = 0; if(T[u].left !=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_238069/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_238069/source.c" target datalayout = "e-m:e-p270: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.Node = type { i32, ...
#include <stdio.h> #include <string.h> #define MAX 30 #define NIL -1 struct Node_struct { int p, l, r; }; typedef struct Node_struct Node; Node T[MAX]; int D[MAX]; int H[MAX]; void print(int u) { int i, d = 0; printf("node %d: parent = %d, sibling = ", u, T[u].p); if (T[u].p == NIL) printf("-1, "); else if...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_238111/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_238111/source.c" target datalayout = "e-m:e-p270: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.Node_struct = type ...
#include<stdio.h> #include<stdlib.h> #define NIL -1 #define MAX 25 typedef struct node{ int l; int r; int p; }Node; void print(int); void calcDepth(int , int ); int calcSib(int); int calcHeight(int); Node T[MAX]; int D[MAX]; int H[MAX]; int main(){ int i,j; int n,id,l,r; int root = NIL; scanf("%d",&n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_238155/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_238155/source.c" target datalayout = "e-m:e-p270: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.node = type { i32, ...
#include<stdio.h> #define MAX 25 #define NIL -1 struct Node_struct{int p, s, d, l, r;}; /*p: 親(parent), l: 左の子(left child), r:右の子(right child)*/ typedef struct Node_struct Node; Node T[MAX]; int D[MAX]; int H[MAX]; void print(int u){ printf("node %d: parent = %d, sibling = %d, degree = %d, depth = %d, height = %d"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_238199/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_238199/source.c" target datalayout = "e-m:e-p270: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.Node_struct = type ...
#include<stdio.h> typedef struct{ int p; int left; int right; } Tree; Tree tree[10000]; #define NIL -1 int geth(int); int main() { int i,id,j,n,k,dep=0,num,l,r,deg=0,h=0; scanf("%d",&n); for(i=0;i<n;i++){ tree[i].p=NIL; } for(i=0;i<n;i++){ scanf("%d%d%d",&id,&l,&r); tree[id].left=l; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_238241/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_238241/source.c" target datalayout = "e-m:e-p270: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.Tree = type { i32, ...
#include<stdio.h> #include<stdlib.h> #include<string.h> int main() { int N, b[101], ans[101]; int i,j; scanf("%d", &N); int N_copy = N; for (i = 1;i <=N;i++) { scanf("%d", &b[i]); if (b[i] > i) { printf("-1\n"); return 0; } } for ( i=N;N>0;i--) { if (b[i] == i) { ans[N] = b[i]; for (j=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_238285/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_238285/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> void show (int *pos, int n){ int i; for(i=1;i<=n;i++){ printf("%d\n",pos[i]); } } int main(int argc, char *argv[]){ int n,m; int i; int num; int a[2019]; int *pos; memset(a,0,sizeof(a)); scanf("%d",&n); pos = calloc(n+1,sizeof(int)); for(i=1;i<=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_238328/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_238328/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x=0; int z=0; int tate[5]={0}; for(x=0;x<5;x++){ scanf("%d",&tate[x]); } for(a=0;a<5;a++){ for(b=5-1;b>0;b--){ if(tate[b]>tate[b-1]){ z=tate[b]; tate[b]=tate[b-1]; tate[b-1]=z; } } } for(x=0;x<5;x++){ if(x==4){ printf("%d\...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_238371/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_238371/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int num[5],i,j,work; for(i =0;i <5;i++){ scanf("%d", &num[i]); } for(i =0;i <5;i++){ for(j =0;j <4;j++){ if(num[j] < num[j+1]){ work =num[j]; num[j] =num[j+1]; num[j+1] =work; } } } for(i =0;i <5;i++){ printf("%d",num[i]); if(i !=4){ pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_238414/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_238414/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 sort(int a[]) { int i, j, t; for (i = 5; i > 1; i--) for (j = 0; j < i - 1; j++) if (a[j] < a[j+1]) { t = a[j]; a[j] = a[j+1]; a[j+1] = t; } } int main(void) { int a[5], i; for (i = 0; i < 5; i++) scanf("%d", &a[i]); sort(a); printf("%d", a[0]); for (i =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_238458/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_238458/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> void swap(int *x,int *y){ int m; if(*x<*y){ m=*x; *x=*y; *y=m; } } int main(){ int a[5],i,j; scanf("%d %d %d %d %d",&a[0],&a[1],&a[2],&a[3],&a[4]); for(i=0;i<5;i++) for(j=0;j<4;j++) swap(&a[j],&a[j+1]); printf("%d %d %d %d %d\n",a[0],a[1],a[2],a[3],a[4]); return 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_238500/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_238500/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 compexch(A,B) if(A<B){ int t; t=A, A=B, B=t; } int main(void){ int i, j, a[5]; scanf("%d %d %d %d %d",&a[0],&a[1],&a[2],&a[3],&a[4]); for(i=0; i<5; i++) for(j=i; j>0; j--) compexch(a[j-1], a[j]); printf("%d %d %d %d %d\n",a[0],a[1],a[2],a[3],a[4]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_238595/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_238595/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,t; int data[5]; scanf("%d %d %d %d %d",&data[0],&data[1],&data[2],&data[3],&data[4]); for(i=0;i<5;i++){ for(t=i+1;t<5;t++){ if(data[i]<data[t]){ int work=data[i]; data[i]=data[t]; data[t]=work; } } } printf("%d %d %d %d %d\n",data[0],data[1],data[2],data[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_238638/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_238638/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 0018 Sorting Five Numbers */ #include <stdio.h> int main(void) { int n[5]; int exchanges; int i, j, temp; for (i = 0; i < 5; i++) scanf("%d", n + i); for (i = 0; i < 4; i++) { exchanges = 0; for (j = 4; j > i; j--) { if (n[j - 1] < n[j]) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_238681/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_238681/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,j,a[5]; for(i=0;i<5;i++){ scanf("%d",&a[i]); } for(i=0;i<5;i++) { for(j=0;j<5;j++){ if(a[i]>=a[j]) { x=a[j]; a[j]=a[i]; a[i]=x; } } } printf("%d %d %d %d %d\n",a[0],a[1],a[2],a[3],a[4]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_238724/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_238724/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...