Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> const int long SIZE = 100000; int main () { int long A[SIZE] , B[SIZE]; int long a , b , k ,m , i , alarge , bsmall; scanf("%ld %ld",&a,&b); scanf("%ld %ld",&k,&m); for(i=0 ; i<a ; i++) scanf("%ld",&A[i]); for(i=0 ; i<b ; i++) scanf("%ld",&B[i]); alarge = ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2533/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2533/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @SIZE = dso_local local_unnamed...
#include<stdio.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head = 1, tail, n; void enqueue(P x); P dequeue(); int main(){ int elaps = 0, c; int i,q; P u; scanf("%d %d",&n,&q); for(i = 1;i <= n; i++){ scanf("%s",Q[i].name); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253342/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253342/source.c" target datalayout = "e-m:e-p270: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> #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 ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253386/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253386/source.c" target datalayout = "e-m:e-p270: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> int main(void) { int n,m,max,i,j,sum,k,r[50],b[50],w[50]; char s[50][51]; scanf("%d %d",&n,&m); for(i=0;i<n;i++){ w[i]=0; b[i]=0; r[i]=0; } for(i=0;i<n;i++){ scanf("%s",s[i]); for(j=0;j<m;j++){ if(s[i][j]!='W'){ w[i]++; } if(s[i][j]!='B'){ b[i]++; } if(s[i][j]!='...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253429/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253429/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char s[10001]; scanf("%d", &n); scanf("%s", s); for (i = 0; s[i] != '\0'; i++) //配列s[iに入ってる文字の、次の文字を代入する { s[i] = 'A' + (s[i] - 'A' + n) % 26; } printf("%s", s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253472/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253472/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100]; int n,i,k=0,j=0; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%1d",&a[i]); if(a[i]==0) k++; else j++; } if(k==j) { printf("2\n%d ",a[0]); for(i=1;i<n;i++) { printf...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25353/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25353/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> int main() { char S[10001],a[10001]; int N,i,j; scanf("%d", &N); scanf("%s", S); for(i=0;S[i]!='\0';i++) { a[i]=S[i]+N; if(a[i]>'Z') { a[i]=a[i]-26; } } a[i]='\0'; printf("%s\n", a); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253573/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253573/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d", &n); char s[10010]; scanf("%s", s); int len; len = strlen(s); for(int i=0; i<len; i++){ char c = s[i] + n; if(c <= 90){ s[i] = c; }else{ s[i] = c % 91 + 65; }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253623/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253623/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main(){ int N,i=1; scanf("%d",&N); //printf("%d\n",N); char S[10000]; scanf("%s",S); //printf("%s\n",S); for (i = 0; i < strlen(S);i++){ //printf("OK\n"); S[i] += N; if(S[i] >= 91) S[i] -= 26; } for (i = 0; i < strlen(S); i+...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253674/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253674/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char c; scanf("%d\n", &n); while (1) { c = getc(stdin); if ((c < 'A') || (c > 'Z')) break; printf("%c", ((c - 'A') + n) % 26 + 'A'); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253724/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253724/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,m,c,i,j; int a,b[20]; int sum[20],cnt=0; scanf("%d %d %d",&n,&m,&c); for(i=0;i<m;i++){ scanf("%d",&b[i]); } for(i=0;i<n;i++){ sum[i]=c; for(j=0;j<m;j++){ scanf("%d",&a); sum[i]+=a*b[j]; } } for(i=0;i<n;i++){ if(0<sum[i]){ cnt++; } } printf("%d",cnt...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253782/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253782/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 abs(int n){ if(n > 0){ return n; } else { return -n; } } int main(){ int n, m, c; scanf("%d %d %d", &n, &m, &c); int b[m]; for(int i = 0; i < m; i++){ scanf("%d", &b[i]); } int a[n][m]; for(int i = 0; i < n; i++){ for(in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253825/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253825/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, m, c, count = 0; int b[20], a[21][21]; scanf("%d %d %d", &n, &m, &c); for (i = 0; i < m; i++) scanf("%d", &b[i]); for (j = 0; j < n; j++) { for (i = 0; i < m; i++) { scanf("%d", &a[j][i]); } a[j][20] = 0; } for (j = 0; j < n; j++) { for (i = 0; i < m; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253869/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253869/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, M, i, A[10000][20], B[10000], C, j, s, count; scanf("%d%d%d",&N,&M,&C); for(i=0;i<M;i++) scanf("%d",&B[i]); for(i=0;i<N;i++) for(j=0;j<M;j++) scanf("%d",&A[i][j]); count=0; for(i=0;i<N;i++){ s=0; for(j=0;j<M;j++) s = s + A[i][j] * B[j]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253911/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253911/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int i,j,n,m,c,sum,ans=0; scanf("%d %d %d",&n,&m,&c); int b[m]; int a[n][m]; for(i=0;i<m;i++) scanf("%d",&b[i]); for(i=0;i<n;i++){ sum=0; for(j=0;j<m;j++){ scanf("%d",&a[i][j]); sum+=a[i][j]*b[j]; } if(sum+c>0) ans++; } printf("%d\n",ans); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253955/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253955/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #define N_MAX 20 #define M_MAX 20 int main(){ int N, M; int A[N_MAX][M_MAX] = {0}; int B[M_MAX] = {0}; int C; int i, j, k; int sum = 0; int cnt = 0; // 入力 scanf("%d %d %d", &N, &M, &C); //printf("%d %d %d\n", N, M, C); for(i=0 ; i<M ; i++){ scan...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254004/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254004/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n, m, c, i, j, ans, count=0; int *b; int **a; scanf("%d", &n); scanf("%d", &m); scanf("%d", &c); b = (int*)malloc(m*sizeof(int)); a = (int**)malloc(n*sizeof(int*)); for(i=0; i<n; i++) { a[i] = (int*)malloc(m*sizeof(int)); } for(i=0; i<m; i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254048/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254048/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #include<stdbool.h> typedef long long ll; typedef long double ld; #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k)) #define rrep(i,l,r)for(ll i=(l);i>=(r);i--) #define INF (1LL<<60) #define MOD1 1000000007 #...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254091/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254091/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #define min(x, y) ((x<y) ? (x) : (y)) int main(){ int N, i, j, ans = 0; scanf("%d", &N); int SN[N]; char S[N][10]; for (i=0; i<N; i++){ scanf("%s", &S[i]); SN[i] = strlen(S[i]); } int A=0, B=0, AB=0; for (i=0; i<N; i++){ i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254134/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254134/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 T, P, R; struct team{ int tID; int correct_n; int wrong[11]; int penalty; }; struct team teams[51]; void sort_c(struct team teams[], int n) { int i, j; for(i = 0; i < n - 1; i++){ for(j = 1; j < n; j++){ if(!(teams[j].correct_n ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254192/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254192/source.c" target datalayout = "e-m:e-p270: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.team = type { i32, ...
#include "stdio.h" int main(){ int i,j,c1,c2,c3,c4,b=1; scanf("%d%d%d%d",&c1,&c2,&c3,&c4); if(c1!=c4) b=0; if(c3!=0&&c1==0&&c4==0) b=0; if(b) printf("1"); else printf("0"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25425/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25425/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <math.h> int main(void){ int x; scanf("%d",&x); for(int i=-1000; i<1000; i++){ for(int j=-1000; j<1000; j++){ if(pow(i,5)-pow(j,5)==x){ printf("%d %d\n",i,j); return 0; } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254293/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254293/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i, j, n, a, b; long long int x, c[2000]; scanf("%d", &x); for( i = 0; i < 2000; i++ ){ c[i] = pow(i, 5.0); } for( i = 0; i < 2000; i++ ){ for( j = 0; j <= i; j++ ){ if( c[i] - c[j] == x ){ printf("%d %d\n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254336/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254336/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int i, N, K; long long a[100001]; scanf("%d %d", &N, &K); for (i = 1; i <= N; i++) scanf("%lld", &(a[i])); long long sum[2][100001], max = 0, tmp; for (i = 1, sum[0][0] = 0, sum[1][0] = 0; i <= N; i++) { sum[0][i] = sum[0][i-1] + a[i]; sum[1][i] = sum[1][i-1] + ((a[i] > 0)? ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254408/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254408/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x, h; double s; while(1){ scanf("%d %d", &x, &h); if(x == 0 && h == 0) break; s = x * x * 1.0; s += hypot(x/2.0, h) * x * 2; printf("%f\n", s); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254451/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254451/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x,h; double s; double th; while(1) { scanf("%d",&x); scanf("%d",&h); if(x==0 && h==0)break; th=sqrt(h*h+((double)x/2)*((double)x/2)); s=th*(double)x*4.0/2.0+(double)x*(double)x; printf("%f\n",s); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254495/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254495/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 SR(int v) { int t; for (t = 1; t * t < v; t++); return t; } int main() { int i; int T; int n; int t; int temp; char R; scanf("%d", &T); while (T--) { scanf("%d", &n); R = 0; for (i = 0; i < n; i++) { scanf("%d", &temp); t = SR(temp); if (t * t > temp) { R = 1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25456/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25456/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 h,w,i,l,n,c; int r[10000]; while(scanf("%d%d%d",&h,&w,&i),h+w+i){ scanf("%d",&n); for(l=0;l<n;l++)scanf("%d",&r[l]); if(h<i){ if(i<w) c=h*h+i*i; else c=h*h+w*w; }else if(i<w){ if(w<h) c=w*w+i*i; else c=h*h+i*i; }else if(w<h){ if(i<h) c=w*w+i*i; else c=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254602/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254602/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t,w,h; int k; int i,j; double mininaname; while(1){ scanf("%d %d %d",&t,&w,&h); if(t == 0 && w == 0 && h == 0) break; if(t >= w && t >= h) t = 0; else if(w >= t && w >= h) w = 0; else if(h >= t && h >= w)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254668/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254668/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 rnd(double a,int n) { double b; b=a*pow(10,n+1); b=(double)(int)(b+0.5); return b*pow(10,-n-1); } int main(void) { double a,b,c,d,e,f,D; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF) { D=a*e-b*d; printf("%.3f %.3f\n",rnd((e*c-b*f)/(a*e-b*d),4),rnd...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254718/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254718/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 struct eq { int a; int b; int c; } eq_t; int main(){ eq_t eq1, eq2; double ans_x, ans_y; while(scanf("%d %d %d %d %d %d", &eq1.a, &eq1.b, &eq1.c, &eq2.a, &eq2.b, &eq2.c)==6) { if(eq1.b == 0) { ans_x = (double)(eq1.c / eq1.a); ans_y = (double)(( eq2.c - eq2.a * ans_x ) / eq...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254761/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254761/source.c" target datalayout = "e-m:e-p270: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.eq = type { i32, i3...
#include <stdio.h> int main(){ double a, b, c, d, e, f; double x, y; while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){ y = (a * f - c * d) / (a * e - b * d); x = (c - b * y) / a; printf("%.3f %.3f\n", x, y); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254804/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254804/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a,b,c,d,e,f,A,x,y,X,Y,Z; //while(scanf_s("%f",&a)!=EOF){ while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){ Y=a*e-b*d,Z=f*a-c*d; y=Z/Y; x=(c-b*y)/a; printf("%.3lf %.3lf\n",x,y); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254848/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254848/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){ double a,b,c,d,e,f; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){ f=(f-c/a*d)/(e-b/a*d); c=c/a-f*b/a; printf("%.3f %.3f\n",c,f); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254891/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254891/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a, b, c, d, e, f; while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){ double x, y; x = (c * e / b - f) / (a * e / b - d); y = (c * d / a - f) / (b * d / a - e); if (-0.0005 < x && x <= 0) x = 0; if (-0.0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254934/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254934/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a,b,c,d,e,f,x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){ if(a<0){ a=-a; b=-b; c=-c; } if(d<0){ d=-d; e=-e; f=-f; } y=((c*d)-(a*f))/((b*d)-(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254978/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254978/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> /*-----Codeforces Round #716 (Div. 2)-A-----*/ int main(){ int T; scanf("%d", &T); while (T--) { int n; scanf("%d", &n); double A[n]; for (int i = 0; i < n ; i++) { scanf("%lf", &A[i]); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25502/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25502/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> int main(void){ float a , b , c , d , e , f; while((scanf("%f %f %f %f %f %f" , &a , &b , &c , &d , &e , &f))!=EOF){ printf("%.3f %.3f\n" , (c*e-b*f)/(a*e-b*d)+0.0 , (a*f-c*d)/(a*e-b*d)+0.0); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255070/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255070/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a,b,c,d,e,f, x,y,dd; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)>0){ dd = (a*e-b*d); x=(c*e-b*f-(c*b*d)/a+(c*d*b)/a)/dd; y=(a*f-c*d)/dd; if(x==0)x=0; printf("%.3f %.3f\n",x,y); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255128/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255128/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[6]; double ans[2]; while(scanf("%d %d %d %d %d %d", num, num+1, num+2, num+3, num+4, num+5) != EOF) { if(((num[1]*num[3])-(num[0]*num[4])) == 0) { //一意に解が求まらない } else { ans[0] = (((double)((num[1]*num[5])-(num[4]*num[2]))) / ((double)((num[1]*num[3])-(num[0]*...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255171/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255171/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a,b,c,d,e,f,x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)+1){ if(floor(a*e-b*d)==0){x=0.000;} else {x=(e*c-f*b)/(a*e-b*d); x=x+0.005; x=x*100; x=floor(x); x=x/100; } if(floor(b*d-a*e)==0){y=0.000;} else {y=(c*d-a*f)/(b*d-...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255214/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255214/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a,b,c,d,e,f,x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){ y = ((c*d)-(a*f)) / ((b*d)-(a*e)); x = ((c-b*y)/a); printf("%.3lf %.3lf\n",x,y); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255265/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255265/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> double rounding(double x, int n) { double i, DP = 1; double X; for(i = 0; i < (n - 1); ++i) { DP *= 10; } X = x * DP; if(x > 0) X = (int)(X + 0.5); else X = (int)(X - 0.5); return (double)(X / DP); } double determinant(double a, double b, double c, double d) { return (a * d) - (b ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255308/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255308/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){ double a,b,c,d,e,f,g,x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){ y=(f-c*d/a)/(e-b*d/a); x=(f-c*e/b)/(d-a*e/b); if(-0.0004<x&&x<=0)x=0; if(-0.0004<y&&y<=0)y=0; printf("%.3f %.3f\n",x,y); } r...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255351/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255351/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){ double a,b,c,d,e,f; double x,y; while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){ if(b!=0){ x=((e*c/b)-f)/((e*a/b)-d); } else{ x=c/a; } if(a!=0){ y=((d*c/a)-f)/((d*b/a)-e); } else{ y=c/b; } x=x*1000,y=y*1000; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255395/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255395/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 SIZ 1400 #define min(a,b) ((a)<(b)?(a):(b)) int A[SIZ][SIZ]; int m[SIZ][SIZ]; int main(){ int i,j,k,x,y,r,M=0,t=0,z; scanf("%d%d",&y,&x); for(j=0;j<y;j++)for(i=0;i<x;i++)scanf("%d",A[j]+i); for(j=0;j<y;j++)for(r=i=0;i<x;m[j][i]=r,i++)r=A[j][i]==0?r+1:0; for(r=i=0;i<x;i++)for(j=0;j<y;j++)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255438/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255438/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d %d",&N,&K); int sum = 0; int len = 0; for(int i=0; i<N; i++){ scanf("%d",&len); if( K-len > len ){ sum = sum + 2*len; }else{ sum = sum + 2*( K - len ); } } printf("%d",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255481/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255481/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100],i,A=0; scanf("%d%d",&n,&k); for(i=0;i<n;i++){ scanf("%d",&x[i]); A+=x[i]<k-x[i]?x[i]:k-x[i]; } printf("%d",A*2); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255539/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255539/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <ctype.h> // program by Mircea Rebengiuc // written for codeforces round 739D3 // written on 2021.08.18 char *p2s[64] = { "1", "2", "4", "8", "16", "32", "64", "128", "256", "512", "1024", "2048", "4096", "8192", "16384", "32768", "65536", "131072", "262144", "524288", "1048576", "2097152"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25559/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25559/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> int main(int argc, char *argv[]) { int N, K, total = 0; int i; scanf("%d\n", &N); scanf("%d\n", &K); for ( i = 0; i < N; i++ ){ int x; scanf("%d\n", &x); if ( x > K - x ){ total += (K - x)*2; } el...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255632/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255632/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a[n],n4=0,no=0; for(int i=0;i<n;i++){ scanf("%d",&a[i]); if(a[i]%4==0){ n4++; }else if(a[i]%2==1){ no++; } } if(n%2==1){ if(n4>=no-1){ printf("Yes"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255676/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255676/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,n,s4=0,s2=0,s0=0; scanf("%d",&n); int i; for(i=0;i<n;i++){ scanf("%d",&a); if(a%4==0)s4++; else if(a%2==0)s2++; else s0++; } int res=0; if(s2>0)s2=1; if(s0==0)res=1; else if(s0==0 && s4==0)res=1; else if(s4==n)res=1; else if(s2+s0-1<=s4)res...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255726/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255726/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t; scanf("%d", &t); for (int i = 1; i <= t; i++){ int k, x, ansr, ansc; scanf("%d", &k); x = sqrt(k); if (x * x == k){ ansr = x; ansc = 1; } else { k -= x * x + 1; ansr = 1; ansc = ++x; while (ansr < x && k > 0){ ansr++; k--; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25577/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25577/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 CARDS_MAX 5000 short a,b,A[CARDS_MAX],B[CARDS_MAX]; int main(void){ int i,j,k,m,n,t; scanf("%hd%hd",&a,&b); i = 0; while(i<a)scanf("%hd",A+i++); i = 0; while(i<b)scanf("%hd",B+i++); i = 0; m = 0; while(i < b){ n = 0; j = 0; k = i; while(j < a){ if(A[j] == B[k])k++,n++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255812/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255812/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(void){ int len; char s[200000]; scanf("%s",s); len = strlen(s); for(int i = 0;i<len;i++){ if(s[i] == '?'){ s[i] = 'D'; } } printf("%s\n",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255856/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255856/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> long long a[100034]; long long b[100034]; int main() { long t ,n1,n2,k,m,i,j; scanf("%ld %ld",&n1,&n2); scanf("%ld %ld",&k,&m); for(i=0;i<n1;i++) scanf("%lld",&a[i]); for(i=0;i<n2;i++) scanf("%lld",&b[i]); n1=n1>n2?n1:n2; int flag=0; j=0; for(i=0;i<n1;) { if(a[i]<b[j]) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2559/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2559/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr co...
#include <stdio.h> #include <stdlib.h> #define int long long #define p (int)(1e9 + 7) #define ms_valtype edge typedef struct { int U; int V; int W; }edge; //比較関数 int compare_ms(ms_valtype a, ms_valtype b){ return a.W - b.W; } //昇順 void sort_sub(ms_valtype *origin, int left, int right, ms_valtype *tmp){ if(right...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255942/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255942/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.edge = type { i64, ...
#include<stdio.h> int main(void){ long long int N,A,B; long long int i; long long int h[100000]; long long int K; long long int left,right; long long int sum; scanf("%lld %lld %lld",&N,&A,&B); //printf("%d\n", N); for(i=0;i<N;++i){ scanf("%lld",&h[i]); //printf("h[%lld]=%lld\n", i,h[i]); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255986/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255986/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t, a, b, c, bet, tot; int main() { scanf("%d", &t); while (t >= 1) { scanf("%d %d %d", &a, &b, &c); bet = a-b; if (bet < 0) bet *= -1; tot = 2*bet; if (a > tot || b > tot || c > tot) printf("-1\n"); else if (c + bet <= tot) printf("%d\n", c + bet); else p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25605/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25605/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> int cmpnum(const void * n1, const void * n2) { if (*(long *)n1 > *(long *)n2) { return -1; } else if (*(long *)n1 < *(long *)n2) { return 1; } else { return 0; } } int cmpnum2(const void * n1, const void * n2) { if (labs(*(long *)n1) > labs(*(long ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256093/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256093/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,s,j,k,n,m; int jro[25]; while(1){ scanf("%d",&i); if(i==0){ break; } for(j=0;j<i;j++){ scanf("%d",&jro[j]); } s=32; k=1; m=0; while(1){ if(k%2==1){ n=(s-1)%5; } else{ n=jro[m]; m++; if(m==i){m=0; } } k...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256136/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256136/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 lw 4280 int main(void){ int n, i, j, x[6] = {0}; double a; scanf("%d", &n); for (i = 0; i < n; i++){ scanf("%lf", &a); if (a < 165.0) x[0] += 1; else if (a <170.0) x[1] += 1; else if (a <175.0) x[2] += 1; else if (a < 180.0) x[3] += 1; else if(a < 185.0) x[4] += 1; else...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256194/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256194/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// include // ---------------------------------------------------------------------------- #include<stdio.h> #include<stdlib.h> #include<ctype.h> #include<math.h> #include<string.h> #include<stdbool.h> // repetition // ---------------------------------------------------------------------------- #define FOR(i, a, b) fo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256237/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256237/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,j,c[6]={0}; double t; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%lf",&t); if(t<165.0)c[0]++; else if(t<170.0)c[1]++; else if(t<175.0)c[2]++; else if(t<180.0)c[3]++; else if(t<185.0)c[4]++; else c[5]++; } for(i=0;i<6;i++){ printf("%d:",i+1)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256288/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256288/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%i", &a); if(a==3||a==5||a==7){ printf("YES\n"); }else { printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256330/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256330/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 count; scanf("%d",&count); if(count==7||count==5||count==3){printf("YES");} else {printf("NO");} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256374/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256374/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int x; scanf("%d",&x); if(x==3||x==5||x==7)printf("YES"); else printf("NO"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256424/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256424/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d", &a); printf((a == 3 || a == 5 || a == 7) ? "YES" : "NO"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256468/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256468/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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=0; scanf("%d",&x); if (x==7 || x==5 || x==3) printf("YES"); else printf("NO"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256510/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256510/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf ("%d",&a); if (a==3 || a==5 || a==7 ){ printf ("YES"); } else { printf("NO"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256554/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256554/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(A, B) (((A) < (B)) ? (B) : (A)) #define MIN(A, B) (((A) < (B)) ? (A) : (B)) int main() { int x; scanf("%d", &x); if (x == 3 || x == 5 || x == 7) printf("YES\n"); else printf("NO\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256598/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256598/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&a); if(a==3||a==5||a==7) printf("YES"); else printf("NO"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256640/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256640/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <math.h> int main(){ int i; int X; scanf("%d", &X); if (X == 3 || X == 5 || X == 7){ printf("YES\n"); } else{ printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256691/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256691/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main(){ char str[1024]; int i; char *ret; scanf("%s",str); if( (strstr(str,"S")==NULL && strstr(str,"N") != NULL) || (strstr(str,"N")==NULL && strstr(str,"S") != NULL) || (strstr(str,"W")==NULL && strstr(str,"E") != NULL) || (strstr(str,"E")==NULL && strstr(str,"W"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256741/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256741/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(void){ char S[1000]; char *np, *sp, *ep, *wp; int x = 0; int y = 0; scanf("%s", S); np = strchr(S, 'N'); sp = strchr(S, 'S'); ep = strchr(S, 'E'); wp = strchr(S, 'W'); if (np != NULL){ y++; } if (sp != NULL){ y--; } if (ep != NU...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256785/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256785/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 m, min, max, i, p[10000], diff[10000], gap, nmax; while(1){ scanf("%d%d%d", &m, &min, &max); if(m==0 && min==0 && max==0)break; for(i=0; i<m; i++){ scanf("%d", &p[i]); if(i!=0){ diff[i]=p[i-1]-p[i]; } } gap=0; nmax=min; for(i=m...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256842/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256842/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> struct node { int id; int weight; struct node *next; }; struct node **list; int *maxdis, *premaxdis; void Insert(int, int, int); void Dfs(int, int); void RevDfs(int, int); int main(void) { int i, n, s, t, w; scanf("%d", &n); maxdis = (int*)calloc(n, sizeof(int)); pre...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256886/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256886/source.c" target datalayout = "e-m:e-p270: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, ...
/* * FileName: C_fix_4 * CreatedDate: 2020-05-17 16:17:26 +0900 * LastModified: 2020-05-17 16:55:42 +0900 */ #include <stdio.h> #include <stdlib.h> #include <string.h> int dp[100000][3]={0}; int dp_search(int **a,int n,int u,int loc){ if(u==n){ return 0; } if(dp[u][loc]!=0){ return...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256929/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256929/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @dp = dso_local local_unnam...
#include<stdio.h> #include<stdlib.h> long minf(long a,long b){ if(a>b){ return b; }else{ return a; } } long maxf(long a,long b){ if(a>b){ return a; }else{ return b; } } int main(){ long n = 0; long a[100000][3] = {}; long dp[100000][3] = {}; long k = 0; long i = 0; long j = 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256972/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256972/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> // The choice that will maximize Taro's happiness is given by the 2D recurrence A(n, a), // where n is the current day and a is the activity performed on day n. // // A(n, a) = (max_{b != a} A(n-1, b)) + a_n int max(int a, int b) { return a > b ? a : b; } int max3(int a, in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257014/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257014/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 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_257065/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257065/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int a,b,c,d,n,h=7,flag=0; scanf("%d",&n); d=n%10; c=(n/10)%10; b=(n/100)%10; a=(n/1000)%10; if(a+b+c+d==7&&flag==0) { printf("%d+%d+%d+%d=7",a,b,c,d); flag=1; } else if(a-b+c-d==7&&flag==0) { printf("%d-%d+%d-%d=7",a,b,c,d); flag=1; } else if(a+b+c-d==7&&flag==0) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257115/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257115/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> #define rep(i,l,r) for(int (i)=(l);(i)<(r);(i)++) #define bit(n,m)((n>>m)&1) int main(){ char a[5]; scanf("%s",a); rep(i,0,8){ int ans=a[0]-48; rep(j,0,3)ans+=bit(i,j)?a[j+1]-48:48-a[j+1]; if(ans==7){ rep(j,0,3)printf("%c%c",a[j],bit(i,j)?'+':'-'); prin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257166/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257166/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 4 int main(void) { int i, j, k, a[4], tmp; char s[4], m[3]; scanf("%s", s); for(i=0; i<4; i++) { a[i] = s[i] - '0'; } for(i=0; i<1<<3; i++) { tmp=a[0]; for(k=0; k<3; k++) m[k]='\0'; k=0; for(j=0; j<3; j+...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257216/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257216/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&a); if(a%2==1) printf("Ehab"); else printf("Mahmoud"); // your code goes here return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25731/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25731/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> int main(void){ int n; scanf("%d",&n); long long ans = 0; long long a[n]; for(int i = 0;i < n;i ++){ scanf("%lld",&a[i]); ans += (a[i]-1); } printf("%lld\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257353/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257353/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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.20181228 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257397/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257397/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); if(n%2==0){ printf("Mahmoud"); } else{ printf("Ehab"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25744/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25744/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,a; while (scanf ("%d",&n)==1&&n) { int sum=0; while (n--) { scanf ("%d",&a); sum+=a-1; } printf ("%d\n",sum); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257483/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257483/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <math.h> int main (void){ int N; long long int a,ans=0; scanf("%d",&N); for (int i = 0; i < N; i++) { scanf("%d",&a); ans=ans+a-1; } printf("%lld",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257526/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257526/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* cat <<EOF >mistaken-paste */ #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" #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 VERYBIG 2000000000000007LL #d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257577/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257577/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @k = dso_local global i64 0...
#include<stdio.h> int main(){ long int n; scanf("%ld",&n); if(n%2==0) printf("Mahmoud"); else printf("Ehab"); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25762/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25762/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> typedef struct List { struct List *next; int v; } list; int main() { int i, u, w, N, M; scanf("%d %d", &N, &M); list **adj = (list**)malloc(sizeof(list*) * (N + 1)), *d = (list*)malloc(sizeof(list) * M * 2); for (i = 1; i <= N; i++) adj[i] = NULL; for (i = 0; i < M; i++) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257663/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257663/source.c" target datalayout = "e-m:e-p270: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.List = type { ptr, ...
#include <unistd.h> #define MAX(a, b) ((a) > (b) ? (a) : (b)) char ibuf[1400100]; char *ibufe = ibuf-1; inline void readall(){ int k, t = 0; while((k=read(STDIN_FILENO, ibuf+t, sizeof(ibuf)-t))>0) t += k; } int read_uint(){ int x=0; while(*(++ibufe) <'0'); do { x *= 10; x += *ibufe-'0'; } while(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257706/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257706/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @ibuf = dso_local global [1...
#include<stdio.h> int main() { int n; scanf("%d",&n); if(n%2 == 0) printf("Mahmoud\n"); else printf("Ehab\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25775/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25775/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 i, taka, aoki, k; scanf("%d%d%d",&taka,&aoki,&k); for(i=0;i<k;i++){ if(i%2 == 0){ taka /= 2; aoki += taka; }else{ aoki /= 2; taka += aoki; } } printf("%d %d",taka,aoki); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257793/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257793/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 k,s,cnt=0; scanf("%d%d", &k ,&s); for(int x=0; x<=k; x++){ for(int y=0; y<=k; y++){ int z = s - x- y; if( z >= 0 && z <= k ){ cnt++; } } } printf("%d",cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257836/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257836/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, m, min, max, t; scanf("%d%d", &n, &m); min = n/2+n%2; max = n; if (max < m) { puts("-1"); return 0; } t = min-min/m*m; if (t) t = min+m-t; else t = min; if (t > max) puts("-1"); else printf("%d\n", t); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25788/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25788/source.c" target datalayout = "e-m:e-p270:32:32-p271: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<stdlib.h> #include<math.h> int main(){ int k,s; int ans = 0; int x,y; scanf("%d %d",&k,&s); for(x=0;x<=k;x++){ for(y=0;y<=k;y++){ if((s-(x+y) <= k) && (x+y <= s)){ ans += 1; } } } printf("%d",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257922/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257922/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 k,s,a,b,c,cnt=0; scanf("%d %d", &k, &s); for(a=0; a<=k; a++){ for(b=0; b<=k; b++){ c=s-a-b; if(c<=k && c>=0) cnt+=1; } } printf("%d",cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257966/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257966/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...