Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> int main() { int N; scanf("%d", &N); char S[N+1]; scanf("%s", S); int flag = 0; if (N % 2 == 1) printf("No\n"); else { for (int i = 0; i < (N / 2); i++) { if (S[i] != S[(N / 2) + i]) { flag = 1; break; } } if (flag == 1) printf("No\n"); else printf("Yes\n"); } return 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366170/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366170/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); char s[n]; scanf("%s",&s); int sum=0; for(int i=0;i<n-1;i++){ if(s[i]!=s[i+1])sum++; } printf("%d",sum+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366213/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366213/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <assert.h> #include <stdlib.h> #include <string.h> #include <math.h> #define NDEBUG // for DEBUG {{{ #ifdef NDEBUG #define DEBUG_PRINT(fmt, ...) ((void)0) #else #define DEBUG_PRINT(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__) #endif #define ASSERT_RANGE(min,x,max) assert(((x)>=(min)) && (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366271/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366271/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unn...
#include<stdio.h> int main(){ int n,ans=1,i; char s[100010]; scanf("%d%s",&n,s); for(i=1;i<n;i++){ if(s[i-1]!=s[i])ans++; } printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366329/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366329/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int n,i; scanf("%d",&n); char s[n+1]; scanf("%s",s); int p=0; for(i=0;i<n;i++){ if(s[i+1]!=s[i]) p++; } printf("%d\n",p); return 0;}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366372/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366372/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, ans; scanf("%d", &n); ans = n; char s[n + 1]; scanf("%s", s); for(int i = 0; i < n - 1; i ++){ if(s[i] == s[i + 1]){ ans -= 1; } } printf("%d", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366415/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366415/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> char S[100000]; int main() { int N, result; int i; scanf ("%d", &N); scanf ("%s", S); result = 1; for (i=1;i<N;i++) { if (S[i]!=S[i-1]) result++; } printf("%d", result); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366459/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366459/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// AtCoder165 C #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <math.h> #include <assert.h> #include <string.h> #include <memory.h> #include <malloc.h> #include <stdlib.h> // qsortで用いる比較用関数.*a<*bならaが先になる. int compare(const void* a, const void* b) { return *(int*)a - *(int*)b; } int revcompare(const ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366501/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366501/source.c" target datalayout = "e-m:e-p270: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_t = type { i32...
#include <stdio.h> #define TRUE (1) #define FALSE (0) int is_in_numlist ( int *numlist, int list_elem_num, int target) { int i; for (i = 1; i < list_elem_num; i++) { if ( numlist[i] == target ) { return TRUE; } } return FALSE; } int main (void) { int s; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366545/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366545/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 f(int n){ return n%2 ? 3*n+1 : n/2; } int main(void){ int a[1000000], i=1, j; scanf("%d", &a[0]); while(1){ a[i] = f(a[i-1]); for(j=0; j<i; j++) if(a[j] == a[i]){ printf("%d\n", i+1); return 0; } i++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366589/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366589/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 data[100000] = {0}; int f(int n) { if ((n & 1) == 0) { //printf("%d\n",n/2); return n/2; } //printf("%d\n",(3*n) + 1); return (3 * n) + 1; } int comp(int i) { int org_i = i; while(1) { i--; if(i < 0) { break; } // printf("c %d %d\n", data[org_i], data[i]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366631/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366631/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @data = dso_local local_unn...
#include<stdio.h> static int func(int n){ int ret = 0; if(n%2 == 0){ ret = n/2; } else{ ret = 3*n + 1; } return ret; } int main() { int s,y; int a[1000001]; scanf("%d", &s); for(int i = 1; i < 1000000; i++ ){ if(i == 1){ a[i] = s; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366675/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366675/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> typedef struct{ double x,y,key; }point; point pnt[101]; int n; int cmp(const void*a,const void*b){ const point*c=a,*d=b; return c->key>d->key?-1:c->key<d->key; } double outer(int q,int r,int s){ return pnt[q].x*(pnt[r].y-pnt[s].y)+pnt[r].x*(pnt[s].y-pnt[q].y)+pnt[s].x*(pnt[q]....
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366718/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366718/source.c" target datalayout = "e-m:e-p270: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.point = type { doub...
#include <stdio.h> #define S_MAX 100<<20 char str[2][S_MAX]; int main(){ int n,i; while(1){ scanf("%d",&n); if(n==0) break; scanf("%s",str[0]); for(i=0; i<n; i++){ int cnt=1,idx1=1,idx2=0; char ch = str[i&1][0]; while(1){ if(ch == str[i&1][idx1]) cnt++; else{ sprintf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366783/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366783/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char S[4][54]; scanf("%d", &N); scanf("%s", &(S[1][1])); scanf("%s", &(S[2][1])); int i, k, situ[54] = {}; for (i = 1, k = 0; i <= N; i++) { if (S[1][i] == S[2][i]) situ[k++] = 1; else { situ[k++] = 2; i++; } } long long ans = (situ[0]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366833/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366833/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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_366877/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366877/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 j,flag,temp,mindiff,minval,i,n,arr[100]; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&arr[i]); } minval=100; for(i=0;i<n;i++) { minval=(minval<arr[i])?minval:arr[i]; } for(i=minval;i>=2;i--) { flag=1; for(j=0;j<n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36692/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36692/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,b,x=0; scanf("%d %d %d",&n,&a,&b); x=n-a; x%=b; printf("%d\n",x); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_366970/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_366970/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 gcd(int a,int b) { if(b==0) return a; else return gcd(b,a%b); } int main() { int arr[100],sum,i,n; scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&arr[i]); sum=gcd(arr[0],arr[1]); for(i=2;i<n;i++) { sum=gcd(arr[i],sum); } printf("%d",sum*n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36702/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36702/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,x,balance; scanf("%d",&x); scanf("%d",&a); scanf("%d",&b); balance = x; balance -= a; do{ balance -= b; }while(balance / b != 0); printf("%d",balance); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367063/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367063/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int a,b,x; scanf("%d%d%d",&x,&a,&b); x=x-a; x=x%b; printf("%d",x); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367113/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367113/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,a,b; scanf("%d%d%d",&x,&a,&b); printf("%d\n",x-a-(x-a)/b*b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367157/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367157/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 Merge(int a[], int p, int q, int r) { int i,j,k,temp[105]; k=p; i=p; j=q+1; while(i<=q && j<=r) { if(a[i]<a[j]) temp[k++]=a[i++]; else temp[k++]=a[j++]; } while(i<=q) temp[k++]=a[i++]; while(j<=r) temp[k++...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36720/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36720/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x, a, b; scanf("%d%d%d", &x, &a, &b); printf("%d\n", (x - a) % b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367243/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367243/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,a,b; scanf("%d",&x); scanf("%d",&a); scanf("%d",&b); printf("%d",(x-a)%b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367294/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367294/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { double weight[100]; char class[100][100]; int i = 0 , j; while(1){ if(scanf("%lf",&weight[i])==EOF){ break; } if(weight[i] <= 48.00){ strcpy(class[i], "light fly"); }else if(weight[i] > 48.00 && weight[i]<=51.00){ strcpy(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367337/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367337/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 weight; while(scanf("%lf",&weight)!=EOF){ if(weight<=48.00)puts("light fly"); else if(weight<=51.00)puts("fly"); else if(weight<=54.00)puts("bantam"); else if(weight<=57.00)puts("feather"); else if(weight<=60.00)puts("light")...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367380/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367380/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 weight; while (scanf("%lf", &weight) != EOF){ if (weight <= 48) printf("light fly\n"); else if (weight <= 51) printf("fly\n"); else if (weight <= 54) printf("bantam\n"); else if (weight <= 57) printf("feather\n"); else if (weight <= 60) printf("light\n"); else...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367423/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367423/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 w; while(scanf("%lf", &w) != EOF) { if(w > 91.00) printf("heavy\n"); else if(w > 81.00) printf("light heavy\n"); else if(w > 75.00) printf("middle\n"); else if(w > 69.00) printf("light middle\n"); else if(w > 64.00) printf("welter\n"); else if(w > 60...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367481/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367481/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #define M 10000000 int N,i,j,F[M]; int main() { for(i=2;i<=M;i++) if(!F[i]) for(j=2*i;j<M;j+=i) F[j]=1; for(;scanf("%d",&N),N;) { for(i=N;i>=13;i--) if(!F[i]&&!F[i-8]&&!F[i-6]&&!F[i-2]) break; printf("%d\n",i); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367531/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367531/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @i = dso_local local_unname...
#include<stdio.h> #define ll long long #define mod 998244353 int main(){ ll d[100001],cnt[100001]={0},n,i,max=0,ans=1; scanf("%lld",&n); for(i=0;i<n;i++){ scanf("%lld",&d[i]); cnt[d[i]]++; max=max<d[i]?d[i]:max; } if(d[0]!=0){ printf("0"); return 0; } for(i=1;i<n;i++){ if(d[i]==0){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367603/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367603/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i; int isused[26]; char ans[36]; char buf, arrow[3]; char ctos[36]; int n; scanf("%d", &n); getchar(); while (n--){ memset(ans, '\0', sizeof(ans)); memset(isused, 0, sizeof(isused)); scanf("%c",...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367661/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367661/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int n; int a[100]; int i; int counter=0; int max=0; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d",&a[n]); if(a[n]==1) counter++;//1が入力された回数を記録 else{ if(counter>max) max=counter; counter=0; } } if(counter>max) max=counter; printf("%d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367711/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367711/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,y,r,result; while(scanf("%d%d%d%d",&n,&k,&x,&y)==4) { if(n<=k) { result=x*n; } else { r=n-k; result=((k*x)+(r*y)); } printf("%d\n",result); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367762/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367762/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 int n,k,x,y,j,sum=0; scanf("%ld%ld%ld%ld",&n,&k,&x,&y); if(n>=k) { j=(n-k)*y; sum=j+(k*x); } else { sum=n*x; } printf("%ld\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367805/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367805/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 haku,ki,sai,en,sum=0; scanf("%d",&haku); scanf("%d",&ki); scanf("%d",&sai); scanf("%d",&en); for(int i=1;i<=haku;i++){ if(i<=ki){ sum+=sai; }else{ sum+=en; } } printf("%d",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367849/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367849/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a,b,c,d,s; while(~scanf("%d%d%d%d",&a,&b,&c,&d)) { if(a>b) { s=b*c+(a-b)*d; } else { s=a*c; } printf("%d\n",s); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367892/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367892/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,K=0,X=0,Y=0,A=0; scanf("%d %d %d %d",&N,&K,&X,&Y); if(N>K) { A = K*X+(N-K)*Y; } else { A = N*X; } printf("%d\n",A); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367935/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367935/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int n, k, x, y, ans=0, i; scanf("%d%d%d%d", &n, &k, &x, &y); for(i=1;i<=n;i++){ if(i<=k) ans=ans+x; else ans=ans+y; } printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_367986/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_367986/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,m,n1,m1,sum; scanf("%d%d%d%d",&n,&m,&n1,&m1); if(n-m>=0) { sum=m*n1+(n-m)*m1; } else sum=n*n1; printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368028/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368028/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, y, sum=0; scanf("%d%d%d%d", &n, &k, &x, &y); if(n<=k) sum=n*x; else { sum=k*x; sum+=(n-k)*y; } printf("%d\n", sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368071/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368071/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 days; int first_price_days; int first_price; int over_price; scanf ("%d",&days); scanf("%d",&first_price_days); scanf("%d",&first_price); scanf("%d",&over_price); if(days > first_price_days){ printf("%d\n",first_price * first_price_day...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368114/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368114/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ============================================================================ Name : AtCoder.c Author : Version : Copyright : Your copyright notice Description : Hello World in C, Ansi-style ============================================================================ */ #include <stdio.h> ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368158/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368158/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); int min(int a, int b); int main(void){ int q; scanf("%d",&q); double x1,y1,x2,y2,x3,y3,x4,y4; double x,y;//直線の交点 double det;//行列式 double k1,k2; int a,b,c,d; for(int i=0;i<q;i++){ scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368200/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368200/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int a,b; scanf("%d %d",&a,&b); printf("%d",a-2*b>0?a-2*b:0); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368251/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368251/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int a,b; scanf("%d %d", &a, &b); int hidden = b*2; if (hidden > a) { printf("0\n"); } else { printf("%d\n", a-hidden); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368301/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368301/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int A, B; scanf("%d %d", &A, &B); if(A - 2*B > 0){printf("%d", A - 2*B);} else{printf("0");} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368352/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368352/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int a, b, x; scanf("%d %d", &a, &b); if (1 > a || a > 100 || 1 > b || b > 100) return 0; else if (a <= 2 * b) x = 0; else x = a - 2 * b; printf("%d", x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368396/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368396/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,uncov; scanf("%d %d",&a,&b); if((a-2*b)<=0) { uncov=0; } else { uncov=a-2*b; } printf("%d\n",uncov); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368439/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368439/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d %d",&a,&b); c=a-(2*b); if(c<=0){ c=0; } printf("%d",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368482/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368482/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { long long int a,b; scanf("%lld%lld",&a,&b); if(a>2*b)printf("%lld\n",a-2*b); else printf("0\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368532/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368532/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int A,B=0; scanf("%d", &A); scanf("%d", &B); if(A<B*2){ printf("0"); } else printf("%d",A-2*B); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368583/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368583/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <math.h> int main(void){ int a; int b; int ans; scanf("%d", &a); scanf("%d", &b); ans = a - b * 2; if(ans<0){ printf("0"); return 0; } printf("%d", ans); retur...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368626/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368626/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,max=0,i,j; scanf("%d",&n); char a[106][106]; int sum[106]={0}; int b[106]={0}; for(i=0;i<n;i++) scanf("%s",a[i]); for(i=0;i<n;i++) { if(b[i]==1) continue; for(j=0;j<n;j++) { if (strcmp(a[i],a[j])==0) { sum[i]++; b[j]=1; } }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36867/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36867/source.c" target datalayout = "e-m:e-p270:32:32-p271: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() { char str[20]; scanf("%s", str); int len=strlen(str); int cnt=26*(len+1)-len; printf("%d\n", cnt); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36872/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36872/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 max(int a, int b){ if(a>b){ return a; } return b; } int min(int a, int b){ if(a>b){ return b; } return a; } int main(){ int H; scanf("%d",&H); int W; scanf("%d",&W); char c; char d; char l[1001][1001]; int i; int j; for(i=1;i<=H;i++){ scanf("%c",&d); for(j=1;j<=W;j++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368763/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368763/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,x,m,a=0,t=1001,c=0; scanf("%d%d",&n,&x); for(int i=0;i<n;i++){ scanf("%d",&m); a+=m; c++; if(t>m) t=m; } while(x-a>=0){ a+=t; c++; } printf("%d",c-1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368806/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368806/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 s,l; char c[29]; scanf("%s",&c); l=strlen(c); s=26*(l+1)-l; printf("%d\n",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36885/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36885/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,x,m[110]; int min=10000; int sum=0; scanf("%d%d",&n,&x); for(int i=0;i<n;i++){ scanf("%d",&(m[i])); if(min>m[i]){ min=m[i]; } sum=sum+m[i]; } printf("%d\n",(x-sum)/min+n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368893/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368893/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int X; int sum = 0; int min; double result; int kekka; scanf("%d %d",&N,&X); if(N < 2 || N > 100){ return 0; } int m[101]; for(int i = 0; i < N; i++){ scanf("%d",&m[i]); } min =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_368936/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_368936/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main() { char a[25]; int n,m; scanf("%s",&a); n = strlen(a); m = (n*26)+(26-n); printf("%d\n",m); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36898/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36898/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> #define min(a,b) (a<b?a:b) int main( ) { int i,N,X,m,Min=200000,Sum=0; scanf("%d%d",&N,&X); for(i=1;i<=N;i++) { scanf("%d",&m); Min=min(Min,m); Sum+=m; } printf("%d",N+(X-Sum)/Min); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369021/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369021/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, a, b; scanf("%d %d", &n, &a); b=n*n-(a); printf("%d\n",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369065/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369065/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ex2_3 KKOO */ #include <stdio.h> int main(void) { int ALL,WHITE; //マス目の一辺の入力 scanf("%d",&ALL); //白いマスの入力 scanf("%d",&WHITE); //黒いマスの出力 printf("%d\n",ALL*ALL-WHITE); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369108/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369108/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ex2_3 pptenshi */ #include<stdio.h> int main(void) { int N; // マス目 int A; // 白色のマス int B; // 黒色のマス // input scanf("%d", &N); scanf("%d", &A); B = N * N - A; // output printf("%d\n", B); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369151/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369151/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ABC074_A Stuart_yg */ #include <stdio.h> #include <string.h> #include <math.h> int main(){ int n,a; //入力受け取り scanf("%d", &n); scanf("%d", &a); //差を出力 printf("%d\n",n*n-a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369195/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369195/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int acs(const void *a, const void *b) { return *(int*)a - *(int*)b; } /* 1,2,3,4.. */ int des(const void *a, const void *b) { return *(int*)b - *(int*)a; } /* 8,7,6,5.. */ int cmp_char(const void *a, const void *b) { return *(char*)a -...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369238/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369238/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, A; scanf("%d %d", &N, &A); int res = N * N - A; printf("%d\n", res); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369281/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369281/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 max(p,q)((p)>(q)?(p):(q)) #define min(p,q)((p)<(q)?(p):(q)) int main(){ ll x,y; scanf("%lld%lld",&x,&y); printf("%lld",x*x-y); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369324/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369324/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(){ int a,n; scanf("%d",&n); scanf("%d",&a); printf("%d",n*n-a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369368/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369368/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int a; int b; scanf("%d", &n); scanf("%d", &a); b = n * n - a; printf("%d\n", b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369410/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369410/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,a; int rect1,rect2; scanf("%d",&n); scanf("%d",&a); rect1 = n*n; if(a>rect1){ rect2=0; }else{ rect2 = rect1 -a; } printf("%d",rect2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369461/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369461/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 h, w; char mp[505][505]; scanf("%d %d", &h, &w); for (int i = 0; i < h; i++) { scanf("%s", mp[i]); } for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { if ((!(i & 1) || j == 0 || mp[i][j] == '#') && j != w - 1) { putchar('#'); } else { putchar('.')...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369504/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369504/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int main(void){ int n, m; int i, j; scanf("%d %d", &n, &m); int a[n][m], b[m]; int c[n]; for(i = 0; i < n; i++){ for(j = 0; j < m; j++){ scanf("%d", &a[i][j]); } } for(i = 0; i < m; i++){ scanf("%d", &b[i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369548/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369548/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 b[101]; int a[101][101]; int res; int n,m; int i,j; scanf( "%d%d", &n, &m ); for( i=0; i<n; i++ ) { for( j=0; j<m; j++ ) { scanf( "%d", &a[i][j] ); } } for( j=0; j<m; j++ ) { scanf( "%d", &b[j] ); } for( i=0; i<n; i++ ) { res=0; for( j=0; j<m; j++ )...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369591/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369591/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 argc, char *argv[]) { int n, m; int *A; int *b; int *itrA, *itrb; int i, j; int tmp; scanf("%d %d", &n, &m); A = (int *)malloc(n * m * sizeof(int)); b = (int *)malloc(m * sizeof(int)); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369634/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369634/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, a[100][100], b[100], c[100] = {0}; int i, j; scanf("%d %d", &n, &m); for (i = 0; i < n; i++) { for (j = 0; j < m; j++) { scanf("%d", &a[i][j]); } } for (i = 0; i < m; i++) { scanf("%d", &b[i]); } for (i = 0; i < n; i++) { for (j = 0; j < m; j++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369678/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369678/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d %d",&n,&m); int a[100][100]={0},b[100]={0},c[100]={0},i,j; for(i=0;i<n;i++){ for(j=0;j<m;j++){ scanf("%d",&a[i][j]); } } for(i=0;i<m;i++){ scanf("%d",&b[i]); } for(i=0;i<n;i++){ for(j=0;j<m;j++){ c[i] = c[i] + (a[i]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369728/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369728/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, m, i, j, a[100][100], b[100], c; scanf("%d%d", &n, &m); for (i = 0; i < n; i++) { for (j = 0; j < m; j++) { scanf("%d", &a[i][j]); } } for (j = 0; j < m; j++) { scanf("%d", &b[j]); } for (i = 0; i < n; i++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369771/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369771/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,j; int A[100][100]; int B[100]; int x=0; scanf("%d %d",&n,&m); for(i=0;i<n;i++){ for(j=0;j<m;j++){ scanf("%d",&A[i][j]); } } for(i=0;i<m;i++)scanf("%d",&B[i]); for(i=0;i<n;i++){ for(j=0;j<m;j++){ x+=B[j]*A[i][j]; } printf("%d\n",x); x=0; } r...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369829/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369829/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100][100] = { 0 }, b[100] = { 0 }, c[100] = { 0 }; int m, n, i, j; scanf("%d %d", &n, &m); for (i = 0;i < n;i++) { for (j = 0;j < m;j++) { scanf("%d", &A[i][j]); } } for (i = 0;i < m;i++) { scanf("%d", &b[i]); } for (i = 0;i < n;i++) { for (j = 0;j < m;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369872/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369872/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,l,r,a[100][100],b[1][100],c[100]; scanf("%d %d",&l,&r); for(i=0;i<l;i++){ for(j=0;j<r;j++){ scanf("%d",&a[i][j]); } } for(i=0;i<r;i++){ scanf("%d",&b[0][i]); } for(i=0;i<l;i++){ for(j=0;j<r;j++){ c[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369915/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369915/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,j; int a[100][100],b[100],c[100]={0}; scanf("%d %d",&n,&m); for(i=0;i<n;i++){ for(j=0;j<m;j++){ scanf("%d",&a[i][j]); } } for(i=0;i<m;i++){ scanf("%d",&b[i]); } for(i=0;i<n;i++){ for(j...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_369959/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_369959/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int main() { int t; scanf("%d", &t); while (t--) { int n, k; scanf("%d%d", &n, &k); char arr[41][41]; for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { arr[i][...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_37000/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_37000/source.c" target datalayout = "e-m:e-p270:32:32-p271: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, m, i, j; scanf("%d %d", &n, &m); int a[100][100]; int b[100]; int c[100] = {0}; for(i=0; i<n; i++){ for(j=0; j<m; j++){ scanf("%d", &a[i][j]); } } for(j=0; j<m; j++){ scanf("%d", &b[j]); } for(i=0; i<n; i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_370043/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_370043/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n,m,a1,b1; int a[100][100]; int b[100]; int c[100]; scanf("%d %d",&n,&m); for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ scanf("%d",&a[i][j]); } } for(int i=0;i<m;i++){ for(int j=0;j<1;j++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_370094/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_370094/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 matrixa[100][100]; int matrixaX, matrixaY; int matrixb[100]; int matrixans[100]; scanf("%d %d", &matrixaX, &matrixaY); for(int i = 0; i < matrixaX; i++){ matrixans[i] = 0; } for(int i = 0; i < matrixaX; i++){ for(int j = 0; j < matrixaY; j++){ scanf("%d", &m...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_370144/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_370144/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #include <stdlib.h> int main() { int a[101][101], b[101], c[101]; int i, j; int n, m; scanf("%d%d", &n, &m); for (i = 0; i < n; i++) { for (j = 0; j < m; j++) scanf("%d", &a[i][j]); } for (j = 0; j < m; j++) scanf("%d", &b[j]); for (i = 0; i < n; i++) { c[i] = 0; f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_370188/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_370188/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #include <stdlib.h> int main() { int a[101][101], b[101], c[101]; int i, j; int n, m; scanf("%d%d", &n, &m); for (i = 0; i < n; i++) { for (j = 0; j < m; j++) scanf("%d", &a[i][j]); } for (j = 0; j < m; j++) scanf("%d", &b[j]); for (i =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_370230/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_370230/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 100 int main(){ int a[N][N],b[N],c[N]; int n,m; scanf("%d %d",&n,&m); for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ scanf("%d",&a[i][j]); } } for(int i=0;i<m;i++){ scanf("%d",&b[i]); } for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ c[i]+=a[i][j]*b[j];...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_370274/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_370274/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,m,i,j; scanf("%d%d", &n, &m); int A[n][m],B[m]; int C[n]; int sum,sum1=0; for( i = 0; i < n; i++){ for( j = 0; j < m; j++){ scanf("%d", &A[i][j]); } } for( i = 0; i < m; i++){ scanf("%d", &B[i]); } for( i = 0; i< n; i++){ for( j = 0; j < m;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_370317/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_370317/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int A, B, C, D, E, F; int reachable_water[4096], reachable_sugar[4096]; void reachable(int mofu[], int c1, int c2, int current, int limit) { if (current > limit || mofu[current]) return; mofu[current] = current; reachable(mofu, c1, c2, current + c1, limit); reachable(mofu, c1, c2, current + c2...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_370368/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_370368/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 array[15][15]; int n, i, j, x, y; while (scanf("%d", &n), n != 0){ for (i = 0; i < n; i++){ for (j = 0; j < n; j++){ array[i][j] = 0; } } x = n / 2 + 1 + (n * 5); y = n / 2 + (n * 5); for (i = 1; i <= n * n; i++){ while (array[x % n][y % n] != 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_370410/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_370410/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, x, y, n, data[15][15]; while(1){ scanf("%d", &n); if(n == 0) break; for(i=0; i<n; i++){ for(j=0; j<n; j++) data[i][j] = 0; } for(i=0, x=n/2+1, y=n/2; i<n*n; i++, x++, y++){ if(x == n && y == n){ x = 0; y = 0; }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_370461/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_370461/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> typedef struct{ char name[21]; int sc; int input; }score; int cmp(const void *a,const void *b){ int c=(*(score *)b).sc-(*(score *)a).sc; return c?c:(*(score *)a).input-(*(score *)b).input; } int main(){ int i,n,win,lose,draw,fa; char name[21]; scor...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_370511/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_370511/source.c" target datalayout = "e-m:e-p270: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.score = type { [21 ...
#include <stdio.h> typedef struct _Date { int year,month,day; }Date; int GetDay(const Date* d1, const Date* d2); int main(void) { Date d1, d2; while(1) { scanf("%d %d %d %d %d %d", &d1.year, &d1.month, &d1.day, &d2.year, &d2.month, &d2.day); if(d1.year<0 || d1.month<0 || d1.day<0 || d2.year<0 || d2.m...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_370562/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_370562/source.c" target datalayout = "e-m:e-p270: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._Date = type { i32,...
#include <stdio.h> int main() { int n,m; scanf("%d%d",&n,&m); if(n==1){ printf("%d",m); return 0; } int d=m/n; int ans; for(int i=1;i<=d;i++){ if(m%i==0)ans=i; } printf("%d",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_370605/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_370605/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> int main(void){ long long int n, m; long long int a; scanf("%lld %lld", &n, &m); a = m/n; long long int i; for(i=a;i>0;i--){ if(m%i==0){ printf("%lld\n", i); i=0; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_370656/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_370656/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 2880 Elevator // 2018.3.21 bal4u #include <stdio.h> #include <stdlib.h> #include <string.h> // 高速入力関連 #if 1 #define gc() getchar_unlocked() #else #define gc() getchar() #endif int in() // 非負整数の入力 { int n = 0, c = gc(); do n = 10 * n + (c & 0xf), c = gc(); while (c >= '0'); return n; } // 本問題関連 #define MAX...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_370713/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_370713/source.c" target datalayout = "e-m:e-p270: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.B = type { i32, i32...
#include <stdio.h> int main(void) { double v, t, y; int N; while (scanf("%lf", &v) != EOF) { t = v / 9.8; y = 4.9 * t * t; N = (int)((y + 5) / 5) + 1; printf("%d\n", N); } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_370757/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_370757/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...