Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> #include<stdlib.h> #define NIL NULL struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; Node root; void insert(int k){ Node y = NIL; Node x = root; Node z; z = malloc(sizeof(struct node)); z->key = k; z->left = NIL; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212389/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212389/source.c" target datalayout = "e-m:e-p270: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 { ptr, ...
#include<stdio.h> #include<stdlib.h> #define NIL NULL struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; Node root; void treeDelete(Node z){ Node y; // node to be deleted Node x; // child of y } void insert(int k){ Node y = NIL; Nod...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212439/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212439/source.c" target datalayout = "e-m:e-p270: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 { ptr, ...
#include<stdio.h> #include<string.h> #include <stdlib.h> struct NODE{ int k; struct NODE *p; struct NODE *l; struct NODE *ri; }; struct NODE *N,*r; void ins(int o){ struct NODE *a=N; struct NODE *b=r; struct NODE *c; c=(struct NODE*)malloc(sizeof(struct NODE)); c->k = o; c->l = N; c->ri = N; w...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212482/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212482/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.NODE = type { i32, ...
#include <stdio.h> #include <string.h> #include <stdlib.h> struct Node { int key; struct Node *parent; struct Node *left; struct Node *right; }; typedef struct Node *NodePointer; void insert(NodePointer t, int w) { NodePointer x; if (t->key <= w) { if (t->right == NULL) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212532/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212532/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ...
#include<stdio.h> #include<stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; Node treeMinimum(Node x){ while(x->left != NIL){ x = x->left; } return x; } Node treeMaximum(Node x){ while(x->righ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212583/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212583/source.c" target datalayout = "e-m:e-p270: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 { ptr, ...
#include <stdio.h> #include <stdlib.h> #define NIL NULL struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; Node root; void insert(Node); void inorder(Node); void preorder(Node); int main() { int n,i,x; char m[10]; Node A; scanf("%d",&n)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212626/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212626/source.c" target datalayout = "e-m:e-p270: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 { ptr, ...
#include <stdio.h> #include <stdlib.h> #include <string.h> struct Node { int key; struct Node *right, *left, *parent; }; typedef struct Node Node; Node *root, *NIL; void insert(int k) { Node *y = NIL; Node *x = root; Node *z; z = (Node *)malloc(sizeof(Node)); z->key = k; z->lef...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212677/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212677/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ...
#include<stdio.h> #include<stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; Node treeMinimum(Node x){ for(;;){ if(x->left==NIL){ break; } else{ x=x->left; return x; } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212727/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212727/source.c" target datalayout = "e-m:e-p270: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 { ptr, ...
#include <stdio.h> #include <stdlib.h> #include <string.h> struct Node { int key; struct Node *right,*left,*parent; }; struct Node *root,*NIL; void insert(int k){ struct Node *y = NIL; struct Node *x = root; struct Node *z; z =(struct Node*) malloc(sizeof(struct Node)); z->key = k; z->left = NIL...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212770/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212770/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ...
#include<stdio.h> #include<stdlib.h> #define NIL NULL struct node{ struct node *right; struct node *left; struct node *p; int key; }; typedef struct node *Node; Node root; Node treeSearch(Node u, int k){ } Node treeSuccessor(Node x){ } void treeDelete(Node z){ Node y; Node x; if(z->left == NIL || z->r...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212820/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212820/source.c" target datalayout = "e-m:e-p270: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 { ptr, ...
#include<stdio.h> #include<stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; //Node treeMinimum(Node x){ //} //Node treeMaximum(Node x){ //} //Node treeSearch(Node u, int k){ //} //Node treeSuccessor...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212864/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212864/source.c" target datalayout = "e-m:e-p270: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 { ptr, ...
#include<stdio.h> int main() { int n, y, i, j, b, r, t, num; double ans, max; while(1){ max = 0.0; scanf("%d", &n); if(n == 0) break; scanf("%d", &y); for(i=0; i<n; i++){ scanf("%d%d%d", &b, &r, &t); if(t == 1){ ans = (1 + y * (double)r / 100); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212921/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212921/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); long a[n+1],b[n]; for(long i=0;i<n+1;i++){ scanf("%ld",&a[i]); } for(long i=0;i<n;i++){ scanf("%ld",&b[i]); } long ans=0; for(long i=0;i<n;i++){ long w1=a[i],w2=a[i+1]; if(b[i]-a[i]>=0){ //次の街に攻撃猶予がある時 a[i+1]=a[i+1]-(b[i]-a[i]); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212965/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212965/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 MAXN 100000 int main(void) { int N; int i; int M[MAXN+1]; int H[MAXN]; long int cnt; scanf("%d",&N); for(i=0;i<N+1;i++){ scanf("%d",&M[i]); } for(i=0;i<N;i++){ scanf("%d",&H[i]); } cnt=0; for(i=0;i<N;i++){ if(M[i]>=H[i]){ cnt+=H[i]; }else{ cnt+=M[i]; H[i]-=M...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213007/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213007/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int N; scanf("%d",&N); int A[N+1]; int B[N]; long long int sum_monstor = 0; for(int i=0;i<N+1;i++){ scanf("%d",&A[i]); sum_monstor += A[i]; } for(int i=0;i<N;i++){ scanf("%d",&B[i]); } for(int i=0;i<N;i++){ i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213050/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213050/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int N; int A[100001], B[100000]; long int bust = 0; scanf("%d", &N); for (i = 0; i < N+1; i++){ scanf("%d", &A[i]); } for (i = 0; i < N; i++){ scanf("%d", &B[i]); } for (i = N - 1; i >= 0; i--){ if(A[i+1]<B[i]){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213094/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213094/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 map[12][6]; char input_map[12][8]; int group_num; int group[12*6][2]; void tansaku(int x,int y,char color) { if(x<0 || x>=6 || y<0 || y>=12)return; if(map[y][x]!=0 || input_map[y][x]!=color)return; group[group_num][0]=y; group[group_num][1]=x; group_num++; map[y][x]=1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213144/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213144/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @map = dso_local local_unna...
#include<stdio.h> int main(void) { int m[100], d[100]; scanf("%d%d%d%d", &m[0], &d[0], &m[1], &d[1]); if (m[0] != m[1]) { printf("1\n"); } else { printf("0\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213188/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213188/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 2 int main() { int man[MAX]; int day[MAX]; scanf("%d %d", &man[0], &day[0]); scanf("%d %d", &man[1], &day[1]); if (man[0] != man[1]) { printf("1\n"); } else { printf("0\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213245/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213245/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* * main.c * * Created on: 2019/07/21 * Author: family */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int main() { int M1 = 0, D1 = 0, M2 = 0, D2 = 0; scanf("%d %d", &M1, &D1); scanf("%d %d", &M2, &D2); if (M1 == M2) { printf("0\n"); } else { printf("1\n"); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213289/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213289/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n, A, B, C; int l[8]; int max = 4680; int MIN(int a, int b){return a<b?a:b;}; int dfs(int cur, int a, int b, int c, int ta, int tb, int tc){ if(cur == n){ if(a * b * c == 0){return max;} return abs(A-a) + abs(B-b) + abs(C-c) + 10*((ta-1) + (tb-1) + (tc-1))...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213346/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213346/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @max = dso_local local_unna...
#include <stdio.h> #include<math.h> int main() { int tt; scanf("%d",&tt); while(tt--) { long long x,n,l1,l2,a,b,ans=0,m1,m2; scanf(" %lld %lld",&x,&n); // if(n%4==0) // { // l1=n-3; // l2=n; // m1=n-2; // m2=n-1; // } // else if(n%4==1) /...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21339/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21339/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,y; scanf("%d%d",&x,&y); if(y%2==0&&2*x<=y&&y<=4*x){ printf("Yes"); }else{ printf("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213432/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213432/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 c,t,x,y; scanf("%d%d",&x,&y); if((y-2*x)%2!=0||(4*x-y)%2!=0||y<2*x||4*x<y) printf("No"); else printf("Yes"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213476/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213476/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #define SIZE 100005 #define PI acosl(-1) //3.14159265358979323846264338327950L #define rep(i, N) for (i = 0; i < N; i++) //制御変数iを用いてN回転 #define array(N, t) (t*)calloc(N, sizeof(t)) //t型N要素の1次元配列を動的確保後0クリア(freeを忘れずに) #define zero(a); {int ite...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213519/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213519/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { i32, ...
#include<stdio.h> signed main(){ int X,Y; scanf("%d %d",&X,&Y); if(X*2<=Y && Y<=X*4 && Y%2==0){ printf("Yes\n"); }else{ printf("No\n"); } return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213562/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213562/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int x, y; scanf("%d %d",&x,&y); if(y%2==1){ printf("No"); }else if((y<2*x)||(4*x<y)){ printf("No"); }else{ printf("Yes"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213605/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213605/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 max(int a,int b){return a>b?a:b;} int min(int a,int b){return a<b?a:b;} int main(void) { int x, y,f=0; scanf("%d %d",&x,&y); for(int i=0;i<=x;i++) { if(y==2*(x-i)+4*i) { printf("Yes"); f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213649/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213649/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { unsigned int X,Y,ans; //input scanf("%d %d",&X,&Y); //check&output if(Y%2 != 0||Y-2*X>2*X) { printf("No"); }else{ printf("Yes"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213692/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213692/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, y, i; scanf("%d %d", &x, &y); for (i = 0; i <= x; i++) { if ((i * 2 + (x - i) * 4) == y) { printf("Yes"); return (0); } } printf("No"); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213742/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213742/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,y; int i; char s[4], t[20]; scanf("%d %d", &x, &y); for(int i=0;i<=x;i++) if (i * 4 + (x - i) * 2 == y) { printf("Yes"); return 0; } printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213786/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213786/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ char s; scanf("%c", &s); //printf("%c\n", s); if(s == 'S'){ printf("Cloudy\n"); }else if(s == 'C'){ printf("Rainy\n"); }else if(s == 'R'){ printf("Sunny\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213836/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213836/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> char pwd[20000]; int pwdlen=1; char option[400]; void parse() { int cur; for (cur=0;option[cur]!=0;cur++) { if (option[cur]=='.') { cur+=2; if (option[cur]==0) { cur--; } pwdlen--; while (pwd[pwdlen-1]!='/') { pwdlen--; } continue; } pwd[pwdlen++]=option...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21388/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21388/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @pwdlen = dso_local local_unn...
#include<stdio.h> int main(void){ char s[6]; scanf("%s",&s); if(s[0]=='S')printf("Cloudy\n"); if(s[0]=='C')printf("Rainy\n"); if(s[0]=='R')printf("Sunny\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_213995/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_213995/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { char s[9]; scanf("%s",s); if(s[0]=='S'){ printf("Cloudy"); } if(s[0]=='C'){ printf("Rainy"); } if(s[0]=='R'){ printf("Sunny"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214037/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214037/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { char S[10]; scanf("%s", &S); if(S[0] == 'S'){printf("Cloudy\n");} if(S[0] == 'C'){printf("Rainy\n");} if(S[0] == 'R'){printf("Sunny\n");} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214088/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214088/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 weather[10]; scanf("%s", weather); if ( !strcmp(weather, "Sunny") ) { printf("Cloudy\n"); } else if ( !strcmp(weather, "Cloudy") ) { printf("Rainy\n"); } else { printf("Sunny\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214138/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214138/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> long long cmpfunc (const void * a, const void * b) { return ( *(long long*)a - *(long long*)b ); } int main(void){ long long int test,i,j,n,count,flag=0,o1=0,o2=0,b1,x,m,l,max,sum2,min,f,c,r,o,sum1,sum=0,y,b,count1=0,a2,b2; char a[100];...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214181/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214181/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { char s[6]; scanf("%s",s); // 出力 if(s[0] == 'S'){ printf("Cloudy"); }else if(s[0] == 'C'){ printf("Rainy"); }else if(s[0] == 'R'){ printf("Sunny"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214231/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214231/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 SZ 100001 int s[SZ],grp[5]; int main(void) { long int n,i,count=0,x; scanf("%ld",&n); for(i=1; i<=n; i++) { scanf("%d",&s[i]); grp[s[i]]++; } count += grp[4]; if(grp[3]<=grp[1]) { count += grp[3]; grp[1] -= grp[3]; grp[3] ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21429/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21429/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 card[4][13]={}; int n, num, i, j; char m; scanf("%d", &n); for(i=0;i<n;i++){ scanf(" %c %d", &m, &num); if(m=='S') card[0][num-1]=1; else if(m=='H') card[1][num-1]=1; else if(m=='C') card[2][num-1]=1; else if(m=='D') card[3][num-1]=1; } for(i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214332/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214332/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,cn; char c,s[5]={'S','H','C','D','\0'}; static int card[4][13]; scanf("%d\n",&n); for(i=0;i<n;i++){ scanf("%c %d\n",&c,&m); for(j=0;j<4;j++) if(s[j]==c) card[j][m-1]=1; } for(i=0;i<4;i++) for(j=0;j<13;j++) if(card[i][j]==0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214376/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214376/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.s = private u...
#include <stdio.h> int main(){ int s[14],h[14],c[14],d[14],i,su,num; char jo; for(i=0;i<14;i++) s[i]=1; for(i=0;i<14;i++) h[i]=1; for(i=0;i<14;i++) c[i]=1; for(i=0;i<14;i++) d[i]=1; scanf("%d",&su); for(i=0;i<su;i++){ scanf("%c",&jo); scanf("%c %d",&jo,&num); if(jo=='S') s[num] = 0; el...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214419/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214419/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[5][14],maisuu,num; char mark,dummy; scanf("%d",&maisuu); for(i=0; i < 5; i++){ for(j=0; j < 14; j++){ n[i][j]=0; } } for(i=0; i < maisuu; i++){ scanf("%c",&dummy); scanf("%c %d",&mark,&num); if(mark == 'S'){ n[0][num] = 1; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214462/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214462/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,card[4][13] = {0}; int i, j, d; char m; scanf("%d", &n); for(i=0;i<n;i++){ scanf(" %c %d", &m, &d); switch(m){ case 'S' : card[0][d-1] = 1; break; case 'H' : card[1][d-1] = 1; break; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214505/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214505/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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_PIC 4 #define MAX_RANK 13 // ????????????2?¬??????????[??????][?????????] int card[MAX_PIC][MAX_RANK]; // ??????????????????????????????????????????0???????????????????????? void CardInitialize(void){ int i, j; for(i = 0; i < MAX_PIC; i++){ for(j = 0; j < MAX_RANK; j++){ card[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214549/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214549/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @card = dso_local local_unn...
#include<stdio.h> int main(void) { int n,i,x,j; int card[4][13]={}; char M; scanf("%d",&n); for(i = 0;i < n+1;i++){ scanf("%c %d%*c",&M ,&x); if(M == 'S'){ card[0][x-1]=1; }else if(M =='H'){ card[1][x-1]=1; }else if(M == 'C'){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214592/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214592/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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{ char suit; int num; int exist; } st_card; st_card card[52] = { { 'S', 1, 0 }, { 'S', 2, 0 }, { 'S', 3, 0 }, { 'S', 4, 0 }, { 'S', 5, 0 }, { 'S', 6, 0 }, { 'S', 7, 0 }, { 'S', 8, 0 }, { 'S', 9, 0 }, { 'S', 10, 0 }, { 'S', 11, 0 }, { 'S', 12, 0 }, { 'S', 13, 0 }, { 'H...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214635/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214635/source.c" target datalayout = "e-m:e-p270: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.st_card = type { i8...
#include <stdio.h> int main(){ int n, i; int num; char mar, sim[]={'S','H','C','D'}; int card[52]; for(i=0; i<52; i++) card[i]=0; scanf( "%d", &n); for( i=0; i<=n; i++){ scanf( "%c %d\n", &mar, &num ); switch(mar){ case 'S': card[ 0+num-1] = 1; break; case 'H': card[13+num-1] = 1; break; case ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214679/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214679/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.sim = private...
#include<stdio.h> int main(){ int a[4][13],n,i,j,k,x; char m; for(i=0;i<4;i++){ for(j=0;j<13;j++){ a[i][j]=0; } } scanf("%d",&n); for(k=0;k<2*n;k++){ scanf("%c %d",&m,&x); if(m=='S')a[0][x-1]=1; else if(m=='H')a[1][x-1]=1; else if(m=='C')a[2][x-1]=1; else if(m=='D')a[3]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214721/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214721/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(int argc, const char * argv[]) { int cards[4][13]={0},n,rank,i,j,a; char mark; scanf("%d",&n); while(n>0){ scanf(" %c %d",&mark,&rank); if(mark=='S'){ a=0; } else if(mark=='H'){ a=1; } else if(mark==...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214772/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214772/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(void){ int n; int s[13] = {}; int h[13] = {}; int c[13] = {}; int d[13] = {}; int number; int i; char *mark; char input[6]; fgets(input, sizeof(input), stdin); n = atoi(input); for (i = 0; i < n; i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214815/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214815/source.c" target datalayout = "e-m:e-p270: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(void){ int n, m, i, j; int cards[][13] = {{}, {}, {}, {}}; char ch; char c[4] = {'S', 'H', 'C', 'D'}; scanf("%d", &n); for(i = 0; i < 2 * n; i++){ scanf("%c %d", &ch, &m); switch(ch){ case 'S': cards[0][m - 1] = 1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214859/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214859/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.c = private u...
#include<stdio.h> int main(void) { int card[4][14] ={0}; char S[]="SHCD"; int n, m, i, j; char s; scanf("%d", &n); for (i = 0; i < n; i++) { scanf(" %c %d", &s, &m); for (j=0; j<4; j++) if (s == S[j]) card[j][m] =1; } for (i = 0; i < 4; i++) { for (j...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214901/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214901/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.S = private u...
#include <stdio.h> int main(void){ int n, m, i, j, k; char c; int card[4][13] = {0}; char mark[4] = {'S', 'H', 'C', 'D'}; scanf("%d\n",&n); for(i=0; i<n; i++) { scanf("%c %d\n", &c, &m); for(j=0; j<4; j++) { if (c == mark[j]) { card[j][m-1] = ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214952/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214952/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.mark = privat...
#include <stdio.h> int main(void){ int cards[128][14] = {{0}}; int i, n, num; char c; scanf("%d", &n); for(i = 0; i < n; i++) { scanf("%c", &c); scanf("%c %d", &c, &num); cards[c][num] = 1; } for(i = 1; i <= 13; i++) { if(cards['S'][i] == 0) { printf("S %d\n", ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_214996/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_214996/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,k,cards[4][13]; char z; for (i = 0; i < 4; i++) { for (j = 0; j < 13; j++) { cards[i][j] = 0; } } scanf("%d",&k); for(i=0;i < k;i++) { scanf("%c", &z); scanf("%c %d", &z,&j); if(z == 'S') { cards[0][j - 1] = 1; } if(z == 'H') { cards[1][j ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215038/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215038/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,p,n,num,c[4][13]={0}; char s[2],ref[]="SHCD"; scanf("%d",&n); while (n--){ scanf("%s %d",&s,&num); if (s[0]=='S') p=0; if (s[0]=='H') p=1; if (s[0]=='C') p=2; if (s[0]=='D') p=3; c[p][num-1]=1; } for (i=0;i<4;i++){ for (j=0;j<13;j++){ if (c[i][j]==0){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215081/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215081/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.ref = private...
#include<stdio.h> #define EXIST 1 #define LOST 0 int main(void) { int i, j, n, rank; char suit; int cards[4][13]; char s[4] = { 'S', 'H', 'C', 'D'}; /* 初期化 */ for ( i=0; i<4; ++i) for ( j=0; j<13; ++j) cards[i][j] = LOST; scanf("%d\n", &n); for ( i=0; i<n;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215124/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215124/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.s = private u...
#include <stdio.h> int main(void){ int i,j,n,m,cn; char c,s[5]={'S','H','C','D','\0'}; static int card[4][13]; scanf("%d\n",&n); for(i=0;i<n;i++){ scanf("%c %d\n",&c,&m); for(j=0;j<4;j++) if(s[j]==c) card[j][m-1]=1; } for(i=0;i<4;i++) for(j=0;j<13;j++) if(card[i][j]==0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215175/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215175/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.s = private u...
#include <stdio.h> int main(void){ int card[4][14] ; int n , no , i , j ; char e , d ; for(i = 0 ; i < 4 ; i++){ for(j = 0 ; j < 14 ; j++){ card[i][j] = 0; } } scanf("%d" , &n); for(i = 0 ; i < n ; i++){ scanf("%c" , &d); scanf("%c %d" , ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215225/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215225/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int t[4][14]; int n, i,j,c; char m, d; for(i=0; i < 4; i++){ for(j=0; j < 14; j++){ t[i][j]=0; } } scanf("%d", &c); for(i = 0; i < c; i++){ scanf("%c", &d); scanf("%c %d", &m, &n); if(m == 'S'){ t[0][n] = 1; } else if(m == 'H'){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215276/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215276/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,h,k,numb,cards[4][13]; for(i=0;i<4;i++){ for(h=0;h<13;h++){ cards[i][h]=0; } } char kind; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%c",&kind); scanf("%c %d",&kind,&numb); if(kind=='S')k=0; if(kind=='H')k=1; if(kind=='C')k=2; if(kind=='D')k=3; cards[k...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215319/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215319/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int a[4][13]={0}; int i, j, k, x, n; char m; scanf("%d", &n); for(k = 0; k < n; k++){ scanf(" %c%d", &m, &x); if(m == 'S') a[0][x - 1] = 1; else if(m == 'H') a[1][x - 1] = 1; else if(m == 'C') a[2][x - 1] = 1; else if(m == 'D') a[3][x - 1] = 1; } for(i = 0; i < 4; i++){ for(j = 0; j ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215362/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215362/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> typedef long long ll; int main(void) { ll a,b,k; scanf("%lld %lld %lld",&a,&b,&k); if(b-a+1<2*k){ for(ll i=a;i<=b;i++){ printf("%lld\n",i); } }else{ for(ll i=a;i<a+k;i++){ printf("%lld\n",i); } for(ll i=b-k+1;i<=b;i++){ printf("%lld\n",i); } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215412/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215412/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, k, n; scanf("%d%d%d", &a, &b, &k); if (k >= b - a + 1) { for (n = a; n <= b; n++) printf("%d\n", n); return 0; } for (n = a; n < a + k; n++) printf("%d\n", n); if (n < b - k + 1) n = b - k + 1; for ( ; n <= b; n++) printf("%d\n", n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215456/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215456/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <stdbool.h> #include <math.h> int main() { int T; scanf("%d",&T); int N[T]; for(int t = 0; t <T;++t) { scanf("%d",&N[t]); } long long int sum[T]; for (int i = 0; i<T;++i) { sum[i] = 0; } for (int i =0;i<T;++i) { sum[i] += pow(2,N[i]); int j = 1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2155/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2155/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #define TRUE 1 #define FALSE 0 int main(void){ int a,b,k; int i; scanf("%d %d %d",&a,&b,&k); for( i=a; i<=b; i++){ ( a+k <= i && i <= b-k) ? : printf("%d\n",i); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215542/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215542/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i,j; int a,b,k; scanf("%d %d %d",&a,&b,&k); if(ceil(((float)b-a+1)/2)<=k) for(i=a;i<=b;i++) printf("%d\n",i); else{ for(i=a;i<a+k;i++) printf("%d\n",i); for(i=k;i>0;i--){ printf("%d\n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215586/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215586/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> double shop(int n,int i){ const int tanka[3] = {380,550,850}; const int per[3] = {5,4,3}; const double wari[3] = {0.8,0.85,0.88}; return tanka[i] * (n - n % per[i]) * wari[i] + (double)tanka[i] * (n % per[i]); } int main(void){ int i, j, k, n; int const ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215650/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215650/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.shop.tanka = priva...
#include <stdio.h> #include <string.h> void reverse(char *S) { char tmp; int i; int length = strlen(S); for (i = 1; i <= length / 2; i++) { tmp = S[i - 1]; S[i - 1] = S[length - i]; S[length - i] = tmp; } } int main() { char S[3], ans[3]; int i; scanf("%s", S); if (strlen(S) > 2) reverse(S); printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215694/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215694/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100]; char t[4]; int len; int i; scanf("%s",s); len=strlen(s); if(len==2){ printf("%s",s); }else{ t[0]=s[2]; t[1]=s[1]; t[2]=s[0]; printf("%s",t); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215737/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215737/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 s[5]; scanf("%s", s); if (strlen(s) == 2) printf("%s\n", s); else printf("%c%c%c\n", s[2], s[1], s[0]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215788/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215788/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); switch(N%10){ case 2: case 4: case 5: case 7: case 9: printf("hon\n"); break; case 0: case 1: case 6: case 8: printf("pon\n"); break; case 3: printf("bon\n"); break; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215845/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215845/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 LENGTH 256 int main() { char input[LENGTH]; int n; fgets(input, LENGTH,stdin); sscanf(input, "%d", &n); int rem = n % 10; if(rem == 2 || rem == 4 || rem == 5 || rem == 7 || rem == 9) { printf("hon \n"); } else if(rem == 0 || rem == 1 || rem == 6 || rem == 8) { printf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215896/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215896/source.c" target datalayout = "e-m:e-p270: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 (void) { int n; scanf ("%d", &n); n %= 10; if (n == 0 || n == 1 || n == 6 || n == 8) puts ("pon"); else if (n == 3) puts ("bon"); else puts ("hon"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215939/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215939/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> int main(void) { int a,s; scanf("%d",&a); s=a%10; if(s==3) printf("bon\n"); else if((s==0)||(s==1)||(s==6)||(s==8)) printf("pon\n"); else printf("hon\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215982/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215982/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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", &N); a = N % 10; if(a == 3){ printf("bon\n"); } else if(a == 0 || a == 1 || a == 6 || a == 8){ printf("pon\n"); } else { printf("hon\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216024/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216024/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 m; int main(){ scanf("%d",&m); int n=m%10; if(n==2 || n==4 || n==5 || n==7 || n==9){ printf("hon\n");} else{ if(n==0 || n==1 || n==6 || n==8){ printf("pon\n");} else{ printf("bon\n");}} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216068/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216068/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ex3_1 suzuto */ #include <stdio.h> int main(void) { int num, first_place; /*変数の宣言*/ scanf("%d",&num); /*本数の入力*/ first_place = num % 10; /*本数の一の位をfirst_placeに代入*/ switch (first_place) { case 2: case 4: case 5: case 7: case 9: printf("hon\n"); /*読み方が「ほん」の時...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216110/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216110/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
//ex3_2 //TKC001 #include<stdio.h> int main(void){ int num, units; scanf("%d", &num); //一の位を求める units = num % 10; switch (units) { //bonを出力 case 3: printf("bon"); break; //ponを出力 case 0: case 1: case 6: case 8: printf("pon"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216161/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216161/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ex3_2 ruuu0048 */ #include <stdio.h> int main(void){ int book_number,keta; //本の数とその数の一桁の変数を宣言 scanf("%d",&book_number); //変数に本の数を入力する keta = book_number % 10; //本の一桁を計算し代入 //条件分岐して助数詞を出力 if(keta == 3){ //一桁目が3なら printf("bon\n"); } else if(keta == 0 || keta == 1 || k...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216204/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216204/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,n_ichinokurai; char buf[10]; char yomikata[3][4] = {("hon"),("bon"),("pon")}; fgets(buf, sizeof(buf), stdin); sscanf(buf, "%d\n", &n); n_ichinokurai = n % 10; if(n_ichinokurai==3){ printf("%s\n",yomikata[1]); } else if(n_ichinokurai==0 || n_ichinokurai...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216248/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216248/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.yomikata = pr...
#include <stdio.h> int main(void) { int N; scanf("%d",&N); if(N <1||999<N){ return 0; } switch(N % 10 ){ case 2 : case 4 : case 5 : case 7 : case 9 : puts("hon"); break; case 0 : case 1 : case 6 : case 8 : puts("pon"); break; default : puts("bon"); break; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216291/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216291/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int T,n,m; scanf("%d",&T); if(0<=T<100){ m=T%10; if(m==2||m==4||m==5||m==7||m==9) printf("hon"); if(m==0||m==1||m==6||m==8) printf("pon"); if(m==3) printf("bon"); } else{ n=T%100; m=n%10; if(m==2||m==4||m==5||m==7||m==9) printf("hon"); if(m==0||m==1||...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216356/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216356/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,k; scanf("%d",&t); for(k=0;k<t;k++){ int n; scanf("%d",&n); int i,j,a=pow(2,n),b=0; for(i=1;i<n/2;i++) a += pow(2,i); for(j=n/2;j<n;j++) b += pow(2,j); printf("%d\n",a-b); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2164/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2164/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> int main(void){ int N; scanf("%d", &N); switch(N % 10){ case 2: case 4: case 5: case 7: case 9: printf("hon\n"); break; case 0: case 1: case 6: case 8: printf("pon\n"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216442/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216442/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdlib.h> #include<stdio.h> #include<string.h> #include<math.h> int main(){ int n; scanf("%d",&n); if(n%10==3){ printf("bon\n"); } else if(n%10==0 || n%10==1 || n%10==6 || n%10==8 ){ printf("pon\n"); } else{ printf("hon\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216493/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216493/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); if(N % 10 == 3){ printf("bon"); }else if(N % 10 == 0 || N % 10 == 1 || N % 10 == 6 || N % 10 == 8){ printf("pon"); }else{ printf("hon"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216536/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216536/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() { int t; int i,j; long long x,y,a,b; scanf("%d",&t); while(t--) { scanf("%lld%lld%lld%lld",&x,&y,&a,&b); if(abs(x)>abs(y)) { j=x; x=y; y=j; } if(x*y<0)printf("%lld\n",(abs(x)+abs(y))*a); else { if(a*2<b) { printf("%...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21658/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21658/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
// AOJ 2898: Prime Number // 2019.2.19 bal4u //#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #define MAX 10000000+2 #define SQRT 3162 // = sqrt(MAX) char noPrime[MAX+1] = { 1, 1, 0, 0 }; void sieve() { int i, j; for (i = 3; i <= SQRT; i+=2) { if (noPrime[i] == 0) { for (j = i*i; j < MAX; j += i) noP...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216622/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216622/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @noPrime = dso_local local_...
#include<stdio.h> int main(){ int i,k,n; char s[1000]; scanf("%d",&k); scanf("%s",s); for(n = 0; s[n] != '\0'; n++){ //printf("%c",s[n]); } if(n <= k){ printf("%s\n",s); }else{ for(i = 0; i < k; i++){ printf("%c",s[i]); } printf("...\n"); } return 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216666/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216666/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 k; char s[100]; int len=0; int i; scanf("%d",&k); scanf("%s",s); len=strlen(s); for(i=0;i<len;i++){ if(i<k){ printf("%c",s[i]); }else{ printf("..."); break; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216709/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216709/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(){ long long t, x, y, a, b, max, min; long long val1, val2, val; scanf("%lld", &t); while(t--){ scanf("%lld%lld%lld%lld", &x, &y, &a, &b); max=x; if(y>max) max=y; min=x+y-max; val1=x+y; val1*=a; val2=min; val2*=b; val2+=(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21676/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21676/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <string.h> #define rep(i, n) for(int i=0; i<(n); ++i) #define max 100001 void debug(char * string, long int target) { printf("%s", string); printf("%ld", target); printf("%c", '\n'); } int main() { short K, n; char S[max]; scanf("%hd%s", &K, S); n = strlen(S); if (n <= ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216802/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216802/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 k; scanf("%d", &k); char s[200]; scanf("%*c%s", s); if (strlen(s) <= k)printf("%s\n", s); else { for (int i = 0; i < k; ++i)printf("%c", s[i]); printf("...\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216846/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216846/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int min_two(int x,int y) { if(x>=y) return y; else return x; } int main() { int t; long long x,y,a,b,min1,money=0; scanf("%d",&t); while(t){ scanf("%lld %lld",&x,&y); scanf("%lld %lld",&a,&b); min1=min_two(x,y); if(a*2<=b){//两步代价大于一步一步的代价 money=(x+y)*a; } else...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21689/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21689/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <string.h> int main(){ int k;char s[128]; scanf("%d", &k); if(k<1||k>100) return 0; scanf("%s", s); if(strlen(s)<1||strlen(s)>100) return 0; if(strlen(s)<=k){ printf("%s",s); return 0; } char c[k+1]; for(int i=0;i<k;i++){ c[i]=s[i]; } c[k]='\0'; print...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216932/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216932/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() { int ret; int k; char s[101]; char sbuf[200]; char *pbuf; memset(s,0,sizeof(s)); memset(sbuf, 0, sizeof(sbuf)); int n; ret = scanf("%d", &k); ret = scanf(" %s", s); n = strlen(s); if (n <= k) printf("%s\n",s); else { pbuf = strncp...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216976/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216976/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { char s[120]; int k,i; scanf("%d",&k); scanf("%s",s); if(strlen(s)<=k) printf("%s",s); else { for ( i = 0; i < k; i++) { printf("%c",s[i]); } printf("..."); } retu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217018/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217018/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...