Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include <stdio.h>
#include <math.h>
typedef struct {
double x,y;
} P;
void print(P p) {
printf("%f %f\n", p.x, p.y);
}
double deg = M_PI / 3;
void kock(int n, P p1, P p2) {
if(!n) return;
P s = {(2 * p1.x + 1 * p2.x) / 3,
(2 * p1.y + 1 * p2.y) / 3};
P t = {(1 * p1.x + 2 * p2.x) / 3,
(1 * p1.y + 2 * p... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_356746/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_356746/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 PowOf2(long long int* a,int n){
int sum=0;
for(int i=0;i<n;i++){
while(a[i]%2!=1){
sum +=1;
a[i]=a[i]/2;
}
}
return sum;
}
int main(){
int t;
scanf("%d",&t);
while(t--){
int n;
scanf("%d",&n);
long long i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_35679/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_35679/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
#include<math.h>
typedef struct{
float x;
float y;
}Koch;
void kochCurve(int, Koch, Koch);//????????????????????£?¨?
int main(void){
int n;
Koch p1, p2;
p1.x = 0;
p1.y = 0;
p2.x = 100;
p2.y = 0;
scanf("%d", &n);
printf("%f %f\n", p1.x, p1.y);
kochCurve(n, p1, p2);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_356832/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_356832/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
typedef struct Point{
double x,y;
}P;
void koch(int ,P,P);
int main()
{
P a1,a2;
int n;
scanf("%d",&n);
a1.x=0.0;
a1.y=0.0;
a2.x = 100.0;
a2.y = 0.0;
printf("%.8f %.8f\n",a1.x,a1.y);
koch(n,a1,a2);
printf("%.8f %.8f\n",a2.x,a2.y);
return 0;
}
void koch... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_356876/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_356876/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
typedef struct{
double x;
double y;
}xx;
void fanc(int n,xx p1,xx p2){
xx a,b,c;
if (n==0) return ;
a.x=(2.0*p1.x+1.0*p2.x)/3.0;
a.y=(2.0*p1.y+1.0*p2.y)/3.0;
b.x=(1.0*p1.x+2.0*p2.x)/3.0;
b.y=(1.0*p1.y+2.0*p2.y)/3.0;
c.x=(b.x-a.x)*(cos(M_PI/3.0))-(b.y-a.y)*(si... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_356919/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_356919/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
typedef struct Point_
{
double x;
double y;
} Point;
void koch(int n, Point a, Point b)
{
if (n == 0)
return;
Point s, t, u;
double th = M_PI * 60.0 / 180.0;
s.x = (2.0 * a.x + 1.0 * b.x) / 3.0;
s.y = (2.0 * a.y + 1.0 * b.y) / 3.0;
t.x = (... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_356977/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_356977/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 c=0,n;
typedef struct XY{
double x;
double y;
}XY;
XY add(XY p1,XY p2){
XY p3 = {p1.x+p2.x,p1.y+p2.y};
return p3;
}
double bunkatu(XY p1, XY p2,int c){
if(c>=n){return 0;}
XY p3 = {((p2.x-p1.x)/3.0),((p2.y-p1.y)/3.0)};
XY s=add(p1,p3);
XY t=add(s,p3);
XY u;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_357019/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_357019/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@c = dso_local local_unname... |
#include<stdio.h>
#include <stdlib.h>
int comp (const void * elem1, const void * elem2)
{
int f = *((int*)elem1);
int s = *((int*)elem2);
if (f > s) return 1;
if (f < s) return -1;
return 0;
}
//qsort (A, sizeof(A)/sizeof(*A), sizeof(*A), comp);
int main()
{
int t;
scanf("%d",&t);
whi... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_35707/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_35707/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
#include<math.h>
typedef struct
{
double x;
double y;
}coordinate;
void Koch_curve( int, coordinate, coordinate);
coordinate C1,C2;
int main()
{
int n;
int i,j;
C1.x=0,C1.y=0; // 始点 p1
C2.x=100,C2.y=0; // 終点 p2
scanf("%d",&n);
printf("%f %f\n", C1.x, C1.y);
Koch_curve(n,C... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_357112/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_357112/source.c"
target datalayout = "e-m:e-p270: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.coordinate = type {... |
#include <stdio.h>
#include <math.h>
typedef struct{
double x;
double y;
}Toge;
void koch(int, Toge, Toge);
int main(){
int n = 0;
int i = 0;
Toge p1 = { 0, 0};
Toge p2 = {100, 0};
scanf("%d",&n);
printf("%.8f %.8f\n",p1.x, p1.y);
koch(n, p1, p2);
printf("%.8f %.8f\n",p2.x, p2.y);
re... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_357156/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_357156/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
struct point{
double x,y;
};
void koch(int n,struct point a,struct point b)
{
struct point s,t,u;
double th=M_PI*60.0/180.0;
if(n==0)
{
return;
}
s.x=(2.0*a.x+1.0*b.x)/3.0;
s.y=(2.0*a.y+1.0*b.y)/3.0;
t.x=(1.0*a.x+2.0*b.x)/3.0;
t.y=(1.0*a.y+2.0*b.y)/3.0;
u.x=(t.x-s.x)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_357206/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_357206/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
unsigned long long int sum,t,n,i,amin,bmin;
static unsigned long long int a[52],b[52];
scanf("%llu",&t);
while(t--)
{
sum=0;
scanf("%llu",&n);
for(i=0;i<n;i++)
{
scanf("%llu",&a[i]);
if(i==0)
amin=... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_35725/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_35725/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@main.a = internal global [52... |
#include<stdio.h>
#include<math.h>
typedef struct {
double x;
double y;
}pin;
void koho(int n,pin p1,pin p2){
pin s,t,u;
double r=M_PI/3;
if(n==0)return;
s.x=(2*p1.x+p2.x)/3;
s.y=(2*p1.y+p2.y)/3;
t.x=(p1.x+2*p2.x)/3;
t.y=(p1.y+2*p2.y)/3;
u.x=(t.x-s.x)*cos(r)-(t.y-s.y)*sin(r)+s.x... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_357307/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_357307/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
typedef struct{
double x,y;
} P;
void p(int,P,P);
int main(){
P p1,p2;
int n;
scanf("%d",&n);
p1.x=0;
p1.y=0;
p2.x=100;
p2.y=0;
printf("%.8f %.8f\n",p1.x,p1.y);
p(n,p1,p2);
printf("%.8f %.8f\n",p2.x,p2.y);
return 0;
}
void p(int n,P p1,P p2){
P a,b,c;
do... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_357358/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_357358/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void) {
int A, B;
int P, Q, R;
int kyori;
if (scanf("%d%d", &A, &B) != 2) return 1;
if (scanf("%d%d%d", &P, &Q, &R) != 3) return 1;
kyori = P * B - Q * (B - A);
printf("%.15f\n", B + (double)kyori / (Q + R));
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_357400/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_357400/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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=0;
scanf("%lld",&a);
b=a/11*2;
a-=b/2*11;
if(a>6){b+=2;}else if(a>0){b+=1;}
printf("%lld",b);
return 0;} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_357444/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_357444/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) {
long long k, score, x;
int top;
scanf("%lld",&x);
score = 0LL;
k = 0LL;
k = x/11LL * 2LL;
// 最初に2~5を上に向ければ初手で6点とれる
top = 5;
if (x % 11LL > 6) k += 2LL;
else if (x % 11LL > 0) k += 1LL;
printf(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_357495/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_357495/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, x0, y0, x1, y1;
int q;
double v0x, v0y, vx, vy, k, v0d;
scanf("%d %d %d %d", &x0, &y0, &x1, &y1);
scanf("%d", &q);
v0x = x1 - x0;
v0y = y1 - y0;
v0d = v0x*v0x+v0y*v0y;
while (q--) {
scanf("%d %d", &x, &y);
vx = x - x0;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_357538/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_357538/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
int cmp(const void *a,const void *b){
return *(int*)a - *(int*)b;
}
int main(void){
int n,k,i,tmp,ans=0;
scanf("%d %d",&n,&k);
int a[200000]={};
for(i=0;i<n;i++) {
scanf("%d",&tmp);
a[tmp-1]++;
}
qsort(a,n,sizeof(int),cmp);
for(i=0;i<n-k;i++) ans+=a[i];
p... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_357581/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_357581/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 compare_int(const void *a, const void *b)
{
return *(int*)b - *(int*)a;
}
int main(void)
{
int n,k;
scanf("%d%d",&n,&k);
int a[n];
int s[200001]={0};
for(int p=0;p<n;p++)
{
scanf("%d",&a[p]);
int aa=a[p];
s[aa]++;
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_357624/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_357624/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int n, i, j;
while((scanf("%d", &n)!=EOF) && n){
int key[100] = {};
char s[100] = {};
char ans[100] = {};
for(i = 0; i < n; i++) scanf("%d", &key[i]);
for(i = n; i < 100; i++) key[i] = key[i%n];
scanf("%s", s);
for(i = 0; i < 100; i++)
{
if(s[i] == '\0') b... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_357668/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_357668/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,r;
int i,j;
int num[50];
int p,c;
int temp[50];
while(1){
scanf("%d %d",&n,&r);
if(n==0&&r==0){
break;
}
for(i=0;i<n;i++){
num[i]=n-i;
}
for(i=0;i<r;i++){
scanf("%d %d",&p,&c);
for(j=0;j<c;j++){
temp[j]=num[p+j-1];
}
for(j=0;j<p-1;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_357718/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_357718/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,n,r,p,c;
int a[50],tmp[50];
while(1){
scanf("%d%d",&n,&r);
if(n==0 && r==0) break;
for(i=0;i<n;i++){
a[i] = n-i;
}
while(r--){
scanf("%d%d",&p,&c);
for(i=0;i<p-1;i++){
tmp[i+c] = a[i];
}
for(;i<p+c-1;i++){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_357761/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_357761/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 *hanahuda, n, r, p, c;
void initHanahuda(){
int i;
hanahuda = (int *)malloc(sizeof(int) * n+1);
for(i = 1; i <= n; i++){
hanahuda[i] = n-i+1;
}
}
void shuffle(int p, int c){
int i;
int *tmparray = (int *)malloc(sizeof(int) * c+1);
//取り出した札をtmparrayに保管
for(i = 1; i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_357819/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_357819/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@n = dso_local global i32 0... |
/*
* main.c
*
* Created on: 2019/07/21
* Author: family
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
typedef unsigned long long int uint64_t;
typedef long long int int64my_t;
typedef struct {
int a;
int b;
} CONNECT_t;
typedef struct {
int p;
int x;
} VERT_VAL_t;
/... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_357912/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_357912/source.c"
target datalayout = "e-m:e-p270: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.CONNECT_t = type { ... |
#include <stdio.h>
#include <string.h>
char X[1001];
char Y[1001];
int c[1001][1001];
int n;
int lcs(){
int m,n,i,j;
m=strlen(X);
n=strlen(Y);
for(i=1;i<=m;i++){
c[i][0]=0;
}
for(j=0;j<=n;j++){
c[0][j]=0;
}
for(i=1;i<=m;i++){
for(j=1;j<=n;j++){
if(X[i-1]==Y[j-1]){
c[i][j]=c[i-1][j-1]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_357963/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_357963/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@X = dso_local global [1001... |
#include<stdio.h>
#include<string.h>
#define max(a,b) (((a)>(b))?(a):(b))
int main(void){
int i,j,k;
int q,tmp;
int xLen,yLen;
int dp[1001][1001]={0};
char x[1001],y[1001];
scanf("%d",&q);
for(i=0;i<q;i++){
scanf("%s",x);
scanf("%s",y);
xLen=strlen(x);
yLen=strlen(y);
for(j=1;j<xLen+1;j++){
for(k=1... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358034/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358034/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
#define max(a,b) (((a)>(b))?(a):(b))
struct Node {
int xl;
int yl;
};
struct Node len;
int main(void){
int i,j,k;
int q,tmp;
int dp[1001][1001]={0};
char x[1001],y[1001];
scanf("%d",&q);
for(i=0;i<q;i++){
scanf("%s",x);
scanf("%s",y);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358078/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358078/source.c"
target datalayout = "e-m:e-p270: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>
static const int N = 1000;
int max(int a,int b){
if(a>b) return a;
return b;
}
int lcs(char *X,char *Y){
int c[N+1][N+1];
int m = strlen(X);
int n = strlen(Y);
int maxl=0;
int i,j;
for(i=m;i>=0;i--){
X[i+1]=X[i];
}
for(i=n;i>=0;i--){
Y[i+1]=Y[i];
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358128/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358128/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a[1100],b[1100];
int c[1100][1100];
int max(int a,int b){
return a>b?a:b;
}
void lcs(char a[],char b[]){
int alen,blen,i,j;
alen=strlen(a),blen=strlen(b);
for(i=0;i<alen;i++)c[i][0]=0;
for(j=0;j<blen;j++)c[0][j]=0;
for(i=1;i<alen;i++)
for(j=1;j... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358179/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358179/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@c = dso_local local_unname... |
#include <stdio.h>
#include <string.h>
int max(int a,int b){
if (a>b) return a;
else return b;
}
char x[1001],y[1001];
int LCS(){
int C[1001][1001];
int n,m,i,j;
m=strlen(x);
n=strlen(y);
int l=0;
for(i=1;i<=m;i++)C[i][0]=0;
for(j=1;j<=n;j++)C[0][j]=0;
for(i=1;i<m;i++){
for(j=1;j<n;j++){... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358229/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358229/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@x = dso_local global [1001... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
int main()
{
int t;
char arr[100000];
scanf("%d", &t);
while(t--){
int x,y,flag=0;
scanf("%d%d", &x,&y);
int r=0,l=0,u=0,d=0;
scanf("%s", arr);
int len = strlen(arr);
for(int i=0... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_35828/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_35828/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 LCS(char *,char *);
int main(){
int i,n,q;
char S1[1002],S2[1002];
scanf("%d",&q);
for(i=0;i<q;i++){
scanf("%s",S1);
scanf("%s",S2);
printf("%d\n",LCS(S1,S2));
}
return 0;
}
int LCS(char *X,char *Y){
int m,n,i,j,c[1002][1002];
m=strlen(X);
n=str... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358322/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358322/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
#define N (1000 + 10)
#define max(a, b) (a < b ? b : a)
int kansu(int i){
if(i==25964)
return 0;
else return i;
}
int dp[N][N];
char a[N], b[N];
int LCS(void)
{
const int a_size = strlen(a) - 1; // last one is '\n'
const int b_size = strlen(b) - 1;
int i, j;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358373/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358373/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@a = dso_local global [1010... |
#include <stdio.h>
#include <string.h>
#define MAX 1001
#define max(a,b) a>b?a:b
int LCS(char x[],char y[]){
int m=strlen(x),n=strlen(y),i,j,lcs[MAX][MAX];
for(i=0;i<=m;i++)lcs[i][0]=0;
for(i=1;i<=n;i++)lcs[0][i]=0;
for(i=1;i<=m;i++){
for(j=1;j<=n;j++){
if(x[i-1]==y[j-1])lcs[i][j]=lcs[i-1][j-1]+1;
el... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358423/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358423/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
#define MAXLEN 1001
char x[MAXLEN];
char y[MAXLEN];
int b[MAXLEN][MAXLEN]; //传递二维数组必须知道列数,所以使用MAXLEN这个确定的数
int max(int a,int c){
if(a>c) return a;
else return c;
}
int LCS()
{
int i, j;
int m = strlen(y);
int n = strlen(x);
memset(b,0,... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358474/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358474/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@y = dso_local global [1001... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_LEN 1001
int dataset;
char str_X[MAX_LEN];
char str_Y[MAX_LEN];
void LCSLength(char *X, char *Y){
int m,n;
int **c;
int i,j;
m = strlen(X);
c = malloc(sizeof(int*) * (m+1));
n = strlen(Y);
for(i=0; i<=m; i++){
c[i] = malloc(siz... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358517/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358517/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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=0;
int ans=0;
int i = 0;
for (i = 0; i < 5; i++){
scanf("%d", &a);
if (a <= 40)a = 40;
ans += a;
}
printf("%d\n", ans / 5);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358560/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358560/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 data[5] = {0},ave = 0,i;
for (i = 0; i < 5; i++) {
scanf("%d",&data[i]);
if (data[i] < 40) {
data[i] = 40;
}
ave += data[i];
}
ave = ave / 5;
printf("%d\n",ave);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358610/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358610/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i;
b=0;
for(i=0;i<5;i++){
scanf("%d",&a);
if(a<40){
b=b+40;
}else{
b=b+a;
}
}
printf("%d\n",b/5);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358654/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358654/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,a[100],ans = 0;
for(i = 0;i < 5;i++){
scanf("%d",&a[i]);
}
for(i = 0;i < 5;i++){
if(a[i] < 40){
a[i] = 40;
}
ans += a[i];
}
printf("%d\n",ans/5);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358698/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358698/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32: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 2008: Dragon Fantasy
// 2017.11.22 bal4u@uu
#include <stdio.h>
#include <string.h>
#include <math.h>
int cx[22], cy[22], n;
double dh[22], dd[22];
double dc[22][22];
double dist(int x1, int y1, int x2, int y2)
{
return hypot(x1-x2, y1-y2);
}
int rec(int i, int s, double d)
{
int j, jj;
if (s == (1<<n) - ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358740/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358740/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@n = dso_local global i32 0... |
#include<stdio.h>
int main()
{
int a,b,c,max,d,min,e,f;
scanf("%d %d %d",&a,&b,&c);
max=a;
min=a;
if(b>max) max=b;
if(c>max) max=c;
if(b<min) min=b;
if(c<min) min=c;
printf("%d",max-min);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358791/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358791/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 asc(const void *a, const void *b) {
return *(int *)a - *(int *)b;
}
int main() {
int i;
int number[3];
for(i = 0; i < 3; i++) {
scanf("%d", &number[i]);
}
qsort(number, 3, sizeof(int), asc);
printf("%d\n", number[2] - number[0]);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358849/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358849/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
# include <stdio.h>
# include <stdlib.h>
int min(int x,int y, int z){
int m = abs(x-y)+abs(y-z);
if(m>abs(y-z)+abs(z-x)) m = abs(y-z)+abs(z-x);
if(m>abs(x-y)+abs(z-x)) m = abs(x-y)+abs(z-x);
return m;
}
int main(){
int a[3];
scanf("%d %d %d",&a[0],&a[1],&a[2]);
printf("%d\n",min(a[0],a[1],a[2]));
retu... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358892/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358892/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 abvalue(int m, int n);
int main(void)
{
int A1;
int A2;
int A3;
int c = scanf("%d %d %d", &A1, &A2, &A3);
int r;
if (A1 <= A2 && A2 <= A3 || A3 <= A2 && A2 <= A1)
{
r = abvalue(A1, A3);
}
else if (A1 <= A3 && A3 <= A2 || A2 <= A3 && A3 <= A1)
{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_358993/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_358993/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,tmp,j,s[3],total;
for (i = 0; i < 3; i++) {
scanf("%d", &s[i]);
}
if (s[0]< 1 || s[0]>100 || s[1] < 1 || s[1]>100 || s[2] < 1 || s[2]>100) {
printf("エラー\n");
return 0;
}
for (i = 0; i<3; ++i) {
for (j = i + 1; j<3; ++j) {
if (s[i] > s[j]) {
tmp = s[i];
s[i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359042/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359042/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a1, a2, a3, max, min;
scanf("%d %d %d", &a1, &a2, &a3);
max = a1;
min = a1;
if(max < a2) max = a2;
if(max < a3) max = a3;
if(min > a2) min = a2;
if(min > a3) min = a3;
printf("%d", max - min);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359107/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359107/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 brock[100];
int H, W, i, j, k, flag;
int res[100];
scanf("%d %d", &H, &W);
for(i = 0; i < H; i++){
flag = -1;
scanf("%s", brock);
for(j = 0; j < W; j++){
if(brock[j] == 'c')
flag = 0;
else if(flag > -1)
flag++;
printf("%d", flag... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359158/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359158/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32: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 : ABC166-B.c
Author : soya
Version :
Copyright : Your copyright notice
Description : Hello World in C, Ansi-style
============================================================================
*/
#include <stdi... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359208/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359208/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 K;
int d;
int *A;
int *ans;
int count = 0;
int b;
int c;
scanf("%d", &N);
scanf("%d", &K);
ans = (int *)malloc(sizeof(int) * (N + 1));
ans[0] = 0;
for (c = 1; c <= N; ++c)
{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359251/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359251/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, k, d, b, c;
int a[100];
scanf("%d %d", &n, &k);
for (int i = 0; i<n;i++){
a[i] = 0;
}
for(int j = 0; j < k; j++){
scanf("%d", &d);
for(int i = 0; i < d;i++){
scanf("%d", &b);
a[b-1] = ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359301/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359301/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int main()
{
int n,k,d,a[100],i,j,l,cnt=0;
scanf("%d %d", &n,&k);
for(i=0;i<=n;i++)
{
a[i]=i+1;
}
for(i=0;i<k;i++)
{
scanf("%d", &d);
for(j=0;j<d;j++)
{
scanf("%d",&l);
a[l-1]=0;
}
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359345/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359345/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <limits.h>
#include <float.h>
#include <stdlib.h>
#include <math.h>
int main(void)
{
long int i, j;
long int n, k;
long int a[100][100];
long int count[100] = {0};
long int work;
long int flg = 0;
long int ans = 0;
scanf("%ld %ld", &n, &k);
for(i = 0; i < k;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359389/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359389/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,d,aa,a[101];
scanf("%d",&n);
scanf("%d",&k);
for(d=0;d<=n;d++){
a[d]=0;
}
while(k>0){
scanf("%d",&d);
while(d>0){
scanf("%d",&aa);
a[aa]=1;
d--;
}
k--;
}
k=0;
for(d=1;d<=n;d++){
if(a[d]==0){
k++;
}
}
pr... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359439/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359439/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main()
{
int n,k;
scanf("%d %d",&n,&k);
int have[101]={0};
int d;
int a;
for(int i = 0;i<k;i++){
scanf("%d",&d);
for(int j=0;j<d;j++){
scanf("%d",&a);
have[a]++;
}
}
int sum = 0;
for(int i = 1;i<=n;i++){
//printf("%d ",have[i]);
if(have[i]==0){
sum+... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359482/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359482/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 snuke[101];
int n,k,d,i,j,tmp,ans=0;
for(i=0;i<=100;i++) snuke[i]=0;
scanf("%d %d",&n,&k);
for(i=0;i<k;i++){
scanf("%d",&d);
for(j=0;j<d;j++){
scanf("%d", &tmp);
if(snuke[tmp]==0) snuke[tmp]=1;
}
}
for(i=1;i<=n;i++){
if(snuke[i]==0) ans++;
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359525/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359525/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
struct node{
int key;
struct node *next;
struct node *prev;
};
typedef struct node *Node;
Node head;
void delete(Node);
int main(){
int n,i,flag,key;
char inst[12];
Node index;
scanf("%d",&n);
head = (Node *)malloc(sizeof(Node));
head->next = hea... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359576/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359576/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.node = type { i32, ... |
#include<stdio.h>
#include<string.h>
#define MAXLEN 1000000
struct sDLL {
int key;
int pre;
int next;
};
int ghead, gtail, gemhead, gemtail, gcnt;
struct sDLL list[MAXLEN+1];
void dllOperation( char *command, int key )
{
int i;
int pre;
if( 0 == strcmp( "insert", command ) ) {
pre=ghead;
i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359619/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359619/source.c"
target datalayout = "e-m:e-p270: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.sDLL = type { i32, ... |
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main(){
int t,p,q;
scanf("%d",&t);
while(t--){
scanf("%d%d",&p,&q);
long long int c=0,d=0;
char s[1000001];
scanf("%s",s);
for(int i=0;i<strlen(s);i++){
if(p>=0 && q>0){
if( s[i]=='R'){
c++;
}
if( s[i]=='U'){
d++;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_35967/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_35967/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct Node{
int data;
struct Node *right, *left;
}node;
node *start;
node *list_init(void);
int insert_list(node *p, int x);
void delete_node(node *p);
node *search_x(int x);
int main(void){
int i, n, x;
char op[12];
node *p;
start = l... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359763/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359763/source.c"
target datalayout = "e-m:e-p270: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{
int k;
struct Node *n;
struct Node *p;
};
typedef struct Node Node;
Node *nil;
void insert(int);
void delete(Node *);
void deletefirst();
void deletelast();
Node * search(int);
void deletek(int);
void print();
int main(){
int n,i,d;
char c[12];
nil=(N... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359813/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359813/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.Node = type { i32, ... |
#include <stdio.h>
#include <stdlib.h>
typedef struct _node{
struct _node *prev;
struct _node *next;
int val;
}Node;
void insert(Node **head, Node **tail, int val ){
Node *ptr;
ptr = (Node*)malloc(sizeof(Node));
ptr->val = val;
ptr->prev = NULL;
ptr->next = *head;
if( *head != NULL ) {
(*head)->p... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359864/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359864/source.c"
target datalayout = "e-m:e-p270: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 <string.h>
#include <stdio.h>
#include <stdlib.h>
struct Node {
int num; //??°???
struct Node *prev;
struct Node *next;
};
struct Node *note;
void insert(int num) {
struct Node *x = (struct Node *)malloc(sizeof(struct Node));
x->num = num;
note->next->prev = x;
x->next = note->nex... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359907/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359907/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.Node = type { i32, ... |
#include <stdio.h>
#include <stdlib.h>
int list[1024][1024];
int main ()
{
int n, m, i, j, k, x, y;
scanf ("%d%d", &n, &m);
for (i = 1; i <= m; i++)
{
scanf ("%d%d", &x, &y);
for (j = (x>1)? x-1: 1; j <= x+1 && j <= n; j++)
for (k = (y>1)? y-1: 1; k <= y+1 && k <= n; k++)
{
list[j][k]++;
if (list[... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36005/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36005/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct _Node {
int key;
struct _Node *next, *prev;
} Node;
Node *nil;
Node* listSearch(int key) {
Node *cur = nil->next;
while(cur != nil && cur->key != key) {
cur = cur->next;
}
return cur;
}
void init(void) {
nil = (Node *)malloc... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360093/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360093/source.c"
target datalayout = "e-m:e-p270: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>
typedef struct Node {
int key;
struct Node *prev;
struct Node *next;
}node;
node *nil;
void init();
void insert(int);
void delete(node *);
void deleteFirst();
void deleteLast();
void printnode();
node *liserch(int);
int main(){
int n,i,k;
c... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360136/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360136/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.Node = type { i32, ... |
#include <stdio.h>
#include <stdlib.h>
int main()
{
long long int t;
scanf("%lld", &t);
do
{
long long int n;
scanf("%lld", &n);
long long int cnt = 0;
while ( n%6 == 0 )
{
n = n/6;
++cnt;
}
while ( n%3 == 0 )
{
n = n/3;
cnt += 2;
}
if ( n == 1 )
{
printf("%lld\n", cnt);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36018/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36018/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
struct node{
unsigned int key;
struct node *next;
struct node *prev;
};
typedef struct node * NodePointer;
NodePointer nil;
NodePointer listSearch(int);
void init();
void printList();
void deleteNode(NodePointer);
void deleteFirst();
void deleteLast()... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360222/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360222/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.node = type { i32, ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct node{
unsigned int key;
struct node *next;
struct node *prev;
};
typedef struct node * NodePointer;
NodePointer nil;
int num;
NodePointer listSearch(int key){
/* your code */
NodePointer n;
for(n = nil->next; n != nil;n = n->next){
if... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360266/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360266/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.node = type { i32, ... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct node{
int key;
struct node *next;
struct node *prev;
};
typedef struct node * NodePointer;
NodePointer nil;
NodePointer listSearch(int key){
NodePointer i;
for(i=nil;i->next!=nil;i=i->next){
if(i->next->key==key)return i->next;
}
return NUL... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360309/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360309/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.node = type { i32, ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct _Node {
int key;
struct _Node *next, *prev;
} Node;
Node *nil;
Node* listSearch(int key) {
Node *cur = nil->next;
while(cur != nil && cur->key != key) {
cur = cur->next;
}
return cur;
}
void init(void) {
nil = (Node *)malloc... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360352/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360352/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct._Node = type { i32,... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int kansu(int i){
if(i==25964)
return 0;
else return i;
}
struct node{
unsigned int key;
struct node *next;
struct node *prev;
};
typedef struct node * NodePointer;
NodePointer nil;
NodePointer listSearch(int key){
NodePointer cur = nil->nex... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360402/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360402/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.node = type { i32, ... |
#include <stdio.h>
#include <stdlib.h>
typedef struct node_s node;
struct node_s{
int key;
node *prev;
node *next;
};
node *head;
void insert(int x){
node *t=malloc(sizeof(node));
t->key=x;
t->next=head->next;
t->prev=head;
head->next->prev=t;
head->next=t;
}
void delete(node *n){
if (n==NULL)re... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360446/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360446/source.c"
target datalayout = "e-m:e-p270: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_s = type { i32... |
#include<stdio.h>
int n,ans;
int main()
{
int t;
scanf("%d",&t);
while(t--){
scanf("%d",&n);
ans=0;
while(n>6){
if(n%6==0)n/=6;
else if(n%3!=0){
printf("-1\n");
break;
}
else n*=2;
ans++;
}
if(n==1){
printf("%d\n",ans);
}else if(n==2 || n==4 || n==5){
printf("-1\n");
}els... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36049/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36049/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
struct Node{
int key;
struct Node *next,*prev;
};
struct Node *nil;
struct Node* listSearch(int key){
struct Node *cur = nil->next;
while(cur != nil && cur->key != key){
cur = cur->next;
}
return cur;
}
void init(){
nil = (struct Node *)malloc... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360532/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360532/source.c"
target datalayout = "e-m:e-p270: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>
int main(void)
{
int N , n , i , j , h , max , min ;
int a[101] ;
scanf("%d",&N);
for(i=0;i<N;i++){
for(j=0;j<101;j++){
a[j]=0;
}
max = 0 ;
min = 0 ;
scanf("%d",&n);
for(j=1;j<=n;j++){
scanf("%d",&h);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360576/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360576/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,h,l,i,t[2],x;
for(scanf("%d",&n);n--;)
{
scanf("%d",&m);
for(h=0,l=10000,i=0;i<m;i++)
{
scanf("%d",&t[i%2]);
if(i!=0)
{
x=t[i%2]-t[(i+1)%2];
if(x>=0)
h=h>x?h:x;
else
l=l<x?l:x;
}
}
printf("%d %d\n",h,l==10000?0:-l);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360626/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360626/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 T, x, y, n;
scanf("%d", &T);
while(T--){
scanf("%d %d %d", &x, &y, &n);
if(n%x==y){
printf("%d\n", n);
continue;
}
else{
if((n-(n%x)+y)%x==y && n-(n%x)+y<n){
printf("%d\n", n-(n%x)+y);
continue;
}
if((n-(n%x))%x==y){
printf("%d\n", n-(n%x... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36067/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36067/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 buf[100];
fgets(buf,100,stdin);
int num_test_cases;
sscanf(buf,"%d",&num_test_cases);
for(int i = 0; i < num_test_cases; i++)
{
int x,y,n,k;
fgets(buf,100,stdin);
sscanf(buf,"%d %d %d", &x, &y, &n);
k = n - (n%x) + y;
k = (y... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36072/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36072/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@stdin = external local_unnam... |
#include <stdio.h>
#include <stdlib.h>
#define MAX 100000
struct Node{
int p;
int l;
int r;
};
void depth(int,int);
void print(int);
struct Node T[MAX];
int n, A[MAX];
int main(){
int k,id,c,l,r;
scanf("%d",&n);
for(int i = 0; i < n; i++){
T[i].r = -1;
T[i].l = T[i].r;
T[i].p = T[i].l;
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360763/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360763/source.c"
target datalayout = "e-m:e-p270: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>
#define MAX_N 100000
struct Node{
int key;
struct Node *next;
struct Node *prev;
};
typedef struct Node* NodePointer;
NodePointer nil[MAX_N];
int memo[MAX_N];
int getDepth(int,int*);
void init(int);
void insert(int,int);
void displayList(int,int);
in... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360820/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360820/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.Node = type { i32, ... |
#include<stdio.h>
#define MAX 100000
#define NIL -1
void getDepth(int,int);
void print(int);
struct Node {
int parent,left,right;
};
struct Node Tree[MAX];
int D[MAX],n;
int main(){
int i,j,node,degree,child,left,right;
scanf("%d",&n);
for(i=0;i<n;i++){
Tree[i].parent = NIL;
Tree[i].left = NIL... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360893/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360893/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.Node = type { i32, ... |
#include<stdio.h>
#include<stdlib.h>
typedef struct node{
int id, deg, dpt;
struct node *par;
int *chl;
}T_node;
int cntdpt(T_node *);
int main(){
int n;
scanf("%d", &n);
T_node *T;
T = (T_node *)malloc(sizeof(T_node) * n);
int i, id;
for(i = 0; i < n; i++)
T[i].par = NULL;
for(i = 0; i < n; i++... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360950/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360950/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.node = type { i32, ... |
#include<stdio.h>
#define N 100001
int depthfunc(int);
struct Node{
int p;
int l;
int r;
};
struct Node T[N];
int main()
{
int i,j,n,par,child,sib,k,x;
scanf("%d",&n);
for(i = 0; i < n; i++){
T[i].p = -1;
T[i].l = -1;
T[i].r = -1;
}
for(i = 0; i < n; i++){
scanf("%d %d",&par,&k... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361050/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361050/source.c"
target datalayout = "e-m:e-p270: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>
typedef struct Node{
int parent,left,right;
}Node;
Node T[100000];
int n,D[100000];
void print(int p){
int i,s;
printf("node %d: parent = %d, depth = %d, ", p, T[p].parent, D[p]);
if(T[p].parent == -1)
printf("root, [");
else if(T[p].left == -1)
printf("leaf, [");
else
printf(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361100/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361100/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.Node = type { i32, ... |
#include<stdio.h>
#define NIL -1
#define MAX 100005
struct Node{
int p;
int l;
int r;
};
struct Node T[MAX];
int n,D[MAX];
int rec(int,int);
int main(){
int i,j,d,v,c,l,r;
scanf("%d",&n);
for(i=0;i<n;i++){
T[i].p=NIL;
T[i].l=NIL;
T[i].r=NIL;
}
for(i=0;i<n;i++){
scanf("%d %d",&v,&d);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361144/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361144/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.Node = type { i32, ... |
#include <stdio.h>
#include <stdlib.h>
int parent[100000];
int degree[100000];
int *children[100000];
int depth(int node){
if(parent[node] == -1)
return 0;
else
return depth(parent[node]) + 1;
}
int main(void){
int n;
scanf("%d", &n);
for(int i=0; i<n; i++)
parent[i] = -1;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361188/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361188/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@parent = dso_local local_u... |
#include <stdio.h>
#include <ctype.h>
#define MAX 100000
int par[MAX];
void init(int);
int depth(int);
int input(void);
char *p;
char in[MAX*100];
int tree[MAX][20],idx[MAX];
int main(){
int n,i,j;
fread(in,sizeof(in),1,stdin);
p = in;
n = input(); init(n);
for(i = 0 ; i < n ; i++){
int id,k,c;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361238/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361238/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@in = dso_local global [100... |
#include <stdio.h>
#define MAX 100005
#define NIL -1
struct Node_struct
{
int p, l, r;
};
/*p: 親(parent), l: 一番左の子(left child), r:右の兄弟(right sibling)*/
typedef struct Node_struct Node;
Node T[MAX];
int D[MAX];
void print(int u)
{
int i, c;
printf("node %d: parent = %d, depth = %d, ", u, T[u].p, D[u]);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361281/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361281/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.Node_struct = type ... |
#include <stdio.h>
#define M 100000
#define NUL -1
struct node{int x,y,z;};
struct node s[M];
int r[M];
void hyouzi(int i){
int j,c;
printf("node %d: parent = %d, depth = %d, ",i,s[i].x,r[i]);
if(s[i].x==NUL) printf("root, ");
else if(s[i].y==NUL) printf("leaf, ");
else printf("internal node, ");
print... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361324/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361324/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.node = type { i32, ... |
#include <stdio.h>
#define MAX 100005
#define NIL -1
struct Node {
int p;
int left;
int right;
};
struct Node Tree[MAX];
int N,D[MAX];
void findDepth(int,int);
int main(){
int i,j;
int d,v,c;
int left,right,value;
scanf("%d", &N);
for (i = 0; i < N; i ++) Tree[i].p = Tree[i].right = T... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361368/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361368/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.Node = type { i32, ... |
#include<stdio.h>
#define N 100000
#define NIL -1
struct Node{int p,l,r;};
struct Node T[N];
int D[N]; //store each Depth
void print(int);
int rec(int,int);
int main(void){
int n,k,v,d,b,r,l;
int i,j;
scanf(" %d",&n);
for(i = 0; i < n; i++){
T[i].p = T[i].l = T[i].r = NIL;
}
for(i = 0; i < n; i++... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361410/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361410/source.c"
target datalayout = "e-m:e-p270: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 ve{
int num;
int parent_num;
int degree;
int depth;
char type[128];
int *child;
};
int n;
int calc_depth(struct ve *, int, int);
int main(){
int p, i, j, id, k, l, m, root;
char f;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361454/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361454/source.c"
target datalayout = "e-m:e-p270: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.ve = type { i32, i3... |
#include <stdio.h>
#define MAX 100005
#define NIL -1
typedef struct {int p, l, r;} Node;
Node T[MAX];
int n, D[MAX];
void print(int u) {
int i,c;
printf("node %d: ",u);
printf("parent = %d, ",T[u].p);
printf("depth = %d, ",D[u]);
if( T[u].p == NIL ) printf("root, ");
else if( T[u].l == NIL ) printf("le... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361498/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361498/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.Node = type { i32, ... |
#include<stdio.h>
#define MAX 100005
#define NIL -1
struct Node_struct{int p, l, r;};
typedef struct Node_struct Node;
Node T[MAX];
int D[MAX];
void print(int u){
int i, c;
printf("node %d: parent = %d, depth = %d, ", u, T[u].p, D[u]);
if(T[u].p == NIL) printf("root, ");
else if(T[u].l == NIL) printf("leaf,... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361540/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361540/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.Node_struct = type ... |
#include<stdio.h>
#define MAX 100005
#define NIL -1
struct Node_struct{int p, l, r;}; /*p: 親(parent), l: 一番左の子(left child), r:右の兄弟(right sibling)*/
typedef struct Node_struct Node;
Node T[MAX];
int D[MAX];
void print(int u){
int i,c;
printf("node %d: parent = %d, depth = %d, ",u,T[u].p,D[u]);
if(D[u]==0)printf(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361584/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361584/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.Node_struct = type ... |
#include <stdio.h>
#include <ctype.h>
#define MAX1 100000
#define MAX2 1500000
int num[MAX1];
void push(int);
int dpth(int);
int input(void);
char *p;
char a[MAX2];
int tree[MAX1][15],x[MAX1];
int main(){
int n,i,j,id,k,c;
fread(a,sizeof(a),1,stdin);
p = a;
n = input();
push(n);
for(i = 0 ; i ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361627/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361627/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@a = dso_local global [1500... |
#include<stdio.h>
#define N 100005
#define NIL -1
void print(int);
void rec(int, int);
struct Node {
int p;
int l;
int r;
};
struct Node T[N];
int x,data[N];
int main() {
int i,j,x,y,z,w,l,r;
scanf("%d",&x);
for(i = 0; i < x; i++) {
T[i].p = T[i].l = T[i].r = NIL;
}
for(i = 0; i < x; i++) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361678/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361678/source.c"
target datalayout = "e-m:e-p270: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>
int main(void) {
int n;
int d;
char suuretu[1024];
int i;
char current[16];
if (scanf("%d", &n) != 1) return 1;
for (i = 0; i < n; i++) {
if (scanf("%d", &d) != 1) return 1;
suuretu[i] = d + '0';
}
suuretu[n] = '\0';
for (i = 0;; i++) {
sprintf(current, "%d", i);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361720/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361720/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.