Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include <stdio.h>
#include <stdlib.h>
int qq(const void *a, const void *b)
{
return *(int*)a - *(int*)b;
}
int main()
{
int i,j;
int count=0;
int n,q;
int n1[100001]={0},q1[50001]={0};
scanf("%d",&n);
for(i=0; i<n; i++){
scanf("%d",&n1[i]);
}
qsort(n1,n,sizeof(int),qq);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177085/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177085/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 S_MAX (100000)
#define T_MAX (50000)
#define BIGGER (100000)
int buffer[BIGGER];
void MergeSort( int data[], int size )
{
int i;
int j;
int k;
int l;
if( size <= 1 )return;
MergeSort( data, size/2 );
MergeSort( data+size/2, size-size/2 );
i = 0;
j = size/2;
k = 0;
while(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177128/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177128/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@buffer = dso_local local_u... |
#include <stdio.h>
#include <stdlib.h>
// void swap(int *a,int *b){
// int temp = *a;
// *a = *b;
// *b = temp;
// }
// void quick(int *a,int left,int right){
// int pl = left;
// int pr = right;
// int axis = a[pl];
// do{
// while(a[pl] < axis) pl++;
// while(a[pr] > axis) pr--;
// if(pl <= pr){
// ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177186/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177186/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 calc(char x,int r,int s,int p){
if(x=='r')return p;
if(x=='s')return r;
if(x=='p')return s;
}
int main(void){
int n,k,sum=0;
scanf("%d%d",&n,&k);
int r,s,p;
scanf("%d%d%d",&r,&s,&p);
char t[n];
scanf("%s",&t);
int flag[k],count=0;
for(int i=0;i<k;i++){
flag[i]=0;
}
for(in... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177229/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177229/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <sys/time.h>
#define N 300000
#define N_ (1 << 20) /* N_ = pow2(ceil(log2(1000000))) */
#define INF 0x3f3f3f3f
int min(int a, int b) { return a < b ? a : b; }
unsigned int X;
void srand_() {
struct timeval tv;
gettimeofday(&tv, NULL);
X = tv.tv_sec ^ tv.tv_usec | 1;
}
int rand_() {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17728/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17728/source.c"
target datalayout = "e-m:e-p270: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.timeval = type { i64,... |
#include <stdio.h>
#include <stdlib.h>
int compare (const void *p, const void *q) {
return *(int*)p - *(int*)q;
}
int compare2 (const void *p, const void *q) {
return *((int*)q + 1) - *((int*)p + 1);
}
int main (void) {
int n, red[100][2], blue[100][2], i, j, x = 0;
scanf("%d", &n);
for (i = 0; ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177322/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177322/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
#include<math.h>
int main(){
long long int a, b, x;
scanf("%lld %lld", &a, &b);
if (a * -1 == b) {
printf("Zero");
}
else if (a > 0 && b > 0) {
printf("Positive");
}
else if (a % 2 == 0 && b > 0) {
printf("Positive");
}
else if (a % 2 == 1 && b > 0) {
printf("Neg... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177373/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177373/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#include <stdbool.h>
#define inf (INT_MAX-1)
#define INF 9223372036854775807;
#define PI 3.14159265358979323846;
#define EPS 1e-10
#define sq(n) ((n)*(n))
#define rep(i,n) for(i=0;i<n;i++)
#d... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177416/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177416/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@mod = dso_local local_unna... |
#include <stdio.h>
#include<stdlib.h>
long long max(long long a, long long b)
{
if (a > b)
return a;
return b;
}
/*long long abs(long long a)
{
if (a > 0)
return a;
return -1;
}*/
int main()
{
int t;
scanf("%d", &t);
while (t--)
{
long long W, H;
scanf("%l... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17746/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17746/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
int main(){
int a, b;
while( scanf("%d %d", &a, &b) != EOF ){
printf("%d\n", a + b);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177502/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177502/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
while( scanf("%d %d", &a, &b) != EOF ){
printf("%d\n", a + b);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177546/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177546/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
while( scanf("%d %d", &a, &b) != EOF ){
printf("%d\n", a + b);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177597/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177597/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
long long n;
long long cout=0;
long long num=0;
long long arr[100000];
scanf("%lld",&n);
arr[n+2];
for(long long i=1;i<=n;i++)
{
scanf("%lld",&arr[i]);
}
for(long long i=1;i<=n;i++)
{
if(arr[i]<=6)
{
printf("15\n");
continue;
}
if(arr[i]%2==0)
{
// printf("a... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17764/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17764/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
int main(){
int a, b;
while( scanf("%d %d", &a, &b) != EOF ){
printf("%d\n", a + b);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177719/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177719/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
while( scanf("%d %d", &a, &b) != EOF ){
printf("%d\n", a + b);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177762/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177762/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
long long int modpow(long long int a, long long int n, long long int p)
{
if (n < 0)return 0;
long long int res = 1;
while (n > 0)
{
if (n % 2 == 1)
res = res * a % p;
n /= 2;
a = a * a % p;
}
return res;
}
int main()
{
long long int n, m;
scanf("%lld %lld", &n, &m);
long long int p ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17782/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17782/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 <unistd.h>
char ibuf[(11<<18)+5];
char *ibufe = ibuf-1;
extern inline void readall(){
int k, t = 0;
while((k=read(STDIN_FILENO, ibuf+t, sizeof(ibuf)-t))>0) t += k;
}
int read_uint(){
int x=0;
while(*(++ibufe) <'0');
do {
x *= 10;
x += *ibufe-'0';
} while(*(++ibufe) >='0');
return x;
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177863/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177863/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@ibuf = dso_local global [2... |
#include <stdio.h>
int main() {
char f[101][101];
int h, w;
scanf("%d%d", &h, &w);
for (int i = 0; i < h; i++) {
scanf("%s", f[i]);
}
for (int i = 0; i < w + 2; i++) {
printf("#");
}
printf("\n");
for (int i = 0; i < h; i++) {
printf("#%s#\n", f[i]);
}
for (int i = 0; i < w + 2; i++) {
printf("#");
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_177906/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_177906/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main()
{
int t;
scanf("%d", &t);
for(int q=0; q<t; q++)
{
long long int n;
scanf("%lld", &n);
if(n%2050!=0)
{
printf("-1\n");
continue;
}
n=n/2050;
int sum=0;
while(n>0)
{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17795/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17795/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 b1, b2, b3, b4;
scanf("%d %d %d %d", &b1, &b2, &b3, &b4);
if (b1 + b2 == b3 + b4 || b1 + b3 == b2 + b4 || b1 + b4 == b2 + b3)
{
printf("YES\n");
} else if (b1+b2+b3==b4 || b1+b2+b4==b3 || b1+b3+b4==b2 || b2+b3+b4==b1){
printf("... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1780/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1780/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr co... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int vet[10100];
int comp(const void* a, const void *b){
int i = *(int *)a,
j = *(int *)b;
return vet[i] - vet[j];
}
int main()
{
int x,x_,y,z,i,j,k,a,b,c,n,m,t,mat[110][110],pos1[10100],pos2[10100],id[10100],ans[110][110]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17805/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17805/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@vet = dso_local local_unname... |
#include<stdio.h>
int main(){
char a[100][101],b[102][102];
int H,W,i,j;
scanf("%d %d",&H,&W);
for(i=0;i<H;i++){
scanf("%s",a[i]);
}
for(i=0;i<H+2;i++){
for(j=0;j<W+2;j++){
b[i][j]='#';
}
}
for(i=0;i<H;i++){
for(j=0;j<W;j++){
b[i+1][j+1]=a[i][j];
}
}
for(i=0;i<H+2;i++){
for(j=0;j<W+2;j++){
printf("%c",b[i]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178093/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178093/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 FOR(i,a,b) for(int i=a;i<b;i++)
int main(){
int h,w;
scanf("%d %d",&h,&w);
char a[102][102];
FOR(i,0,h){
scanf("%s",a[i]);
}
FOR(num,0,w+2) printf("#");
printf("\n");
FOR(i,0,h){
printf("#%s#\n",a[i]);
}
FOR(num,0,w+2) printf("#");
printf("\n");
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178136/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178136/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int t;
scanf("%d",&t);
while(t--){
long long int n,sum=0,m,ans;
scanf("%lld",&n);
if(n%2050!=0){
printf("-1\n");
}
else{
ans=n/2050;
while(ans>0)
{
m=ans%10;
sum=sum+m;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17818/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17818/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
long long int sumDigits(long long int x)
{
long long int count = 0;
while (x > 0)
{
count+=x%10;
x /= 10;
}
return count;
}
int main()
{
int testcases;
scanf("%d", &testcases);
//printf("%d", testcases);
while (testcases > 0)
{
long long... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17823/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17823/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 variety, num, sum = 0;
int price[1000] = { 0 };
scanf("%d %d", &variety, &num);
for (int i = 0; i < variety; i++) {
scanf("%d", &price[i]);
}
int min = price[0];
for (int i = 0; i < variety - 1; i++) {
for (int j = variety - 1; j > i; j--) {
if (price[j-1] > pric... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178273/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178273/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
signed main(){
int p,n,k,x[1005],ans=0,i,temp,min;
scanf("%d %d",&n,&k);
for(p=0;p<n;p++){
scanf("%d",&x[p]);
}
for(p=0;p<n-1;p++){
min=p;
for(i=p+1;i<n;i++){
if(x[i]<x[min]){
min=i;
}
}
if(min!=p){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178323/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178323/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
int sum=0;
int temp=0;
scanf("%d%d",&N,&K);
int a[N];
for(int i=0;i<N;i++)
{
scanf("%d",&a[i]);
}
for(int m=0;m<K;m++)
{
for(int n=m+1;n<N;n++){
if(a[m]>a[n])
{
temp=a[m];
a[m]=a[n];
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178367/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178367/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int t;
scanf("%d",&t);
while(t--){
long long int n,s=0,p,k;
scanf("%lld",&n);
if(n % 2050!=0)
{
printf("-1\n");
}
else
{
k=n/2050;
while(k>0)
{
p=k%10;
s=s+p;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17841/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17841/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 K,N,p[1001]={0},i,tmp,count=0,answer=0;
scanf("%d %d",&N,&K);
for(i=0;i<N;i++){
scanf("%d",&tmp);
p[tmp]+=1;
}
for(i=0;i<1001;i++){
if(p[i]==0){
continue;
}else{
answer += i*p[i];
count += p[i];
if(count>K){
answer = answer - (count - K)*i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178453/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178453/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
int main(void){
int n,k;
scanf("%d %d",&n,&k);
int p[n],i,j,tmp,total=0;
for(i=0;i<n;i++){
scanf("%d",&p[i]);
}
for (i=0; i<n; i++) {
for (j=i+1; j<n; j++) {
if (p[i] > p[j]) {
tmp = p[i];
p[i] = p[j];
p[j] = tmp;
}
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178497/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178497/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,s,k,i;
long long N,n,p,q;
scanf("%d",&t);
while(t--)
{ k=0;
s=0;
q=10;
scanf("%lld",&n);
N=n/2050;
while(N!=0)
{
N=N/10;
k++;
}
for(i=0;i<k;i++)
q=q*10;
q=q*205;
p=n/q;
while(n>=2050)
{
if(p>0)
{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17854/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17854/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 n;
int chk, ans;
int main() {
scanf("%d", &n);
for(int i=0;i<n;i++) {
int tmp;
scanf("%d", &tmp);
if(chk) continue;
if(tmp>ans+15) chk=1;
else ans=tmp;
}
printf("%d", ans+15>90?90:ans+15);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17867/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17867/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 m,M;
scanf("%d", &m);
if(m >=1 && m<= 23){
M = (24-m)+24;
printf("%d\n", M);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178712/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178712/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n;
int time[91];
int ans;
int times;
int main(){
int i,j;
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d",&j);
time[j]++;
}
while(ans<15&×<90){
ans++;
times++;
if(time[times]!=0)ans=0;
}
printf("%d",times);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17885/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17885/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 n;
int a,b;
int i,j;
char t;
char t1[1000];
char t2[1000];
char t3[8];
scanf("%s",&t1);
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%s",&t3);
if(strcmp(t3,"replace")==0){
scanf("%d %d %s",&a,&b,&t2);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178936/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178936/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
void pri(int a, int b, char x[]){
int i;
for(i = 0; i < b - a + 1; i++){
printf("%c",x[ a + i ]);
}
printf("\n");
}
void rev(int a, int b, char x[]){
char z[1100];
int i;
strcpy(z,x);
for(i = 0; i < b - a + 1; i++){
z[a + i] = x[b - i];
}
strcpy(x,z);... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_178987/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_178987/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str.2 = private unnamed_a... |
#include <stdio.h>
#include <string.h>
int
main()
{
char str[1001];
scanf("%s", str);
int n_orders;
scanf("%d", &n_orders);
char order[10];
char p[1001];
int a, b;
int ni, si;
for (ni = 0; ni < n_orders; ni++)
{
scanf("%s", order);
if (strcmp(order, "print") == 0)
{
scanf("%d %d", &a, &b);
for ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179036/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179036/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,k=0,l=0,a[100];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<n;i++)
{
if((a[i]-k)>15)
break;
k=a[i];
}
if(i==n)
{
if((90-a[n-1])>15)
printf("%d",a[n-1]+15);
else
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17908/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17908/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
int main()
{
int n, a[100],i,tm,j;
scanf("%d",&n);
a[0]=0;
for(i=1; i<=n; i++)
scanf("%d",&a[i]);
for(i=0,j=1; i<n; i++,j++)
{
if((a[j]-a[i])>15)
{
tm=a[i]+15;
break;
}
}
if(i<n)
printf("%d\n",tm);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17913/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17913/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
char str[1005];
char nstr[1005];
char cmd[10];
int main() {
#ifdef TEST
freopen("input", "r", stdin);
#endif
scanf("%s", &str);
int n;
scanf("%d", &n);
int l, r;
for (int i = 0; i < n; ++i) {
scanf("%s %d %d", cmd, &l, &r);
if(cmd[2] == 'p... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179180/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179180/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 str[1001] = {0};
int q;
fgets(str, sizeof(str), stdin);
if ( str[strlen(str) - 1] == '\n' ) {
str[strlen(str) - 1] = '\0';
}
scanf("%d\n", &q);
for ( int i = 0; i < q; i++ ) {
char ins... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179223/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179223/source.c"
target datalayout = "e-m:e-p270: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>
char str[1005];
char p[1005];
int main()
{
int q, a, b;
char op[10], *x, *y, c;
scanf("%s%d", str, &q);
while (q--) {
scanf("%s%d%d", op, &a, &b);
if (op[2] == 'i') { // print
b++, c = *(str+b), *(str+b) = 0, puts(str+a), *(str+b) = c;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179267/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179267/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 arr[100000];
int on;
int main()
{
int n, q;
scanf("%d %d", &n, &q);
for (int i = 0; i < n; i++)
{
scanf("%d", &arr[i]);
if (arr[i] == 1)
{
on++;
}
}
for (int i = 0; i < q; i++)
{
int type, value;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17931/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17931/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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(void){
char s[1000];
scanf("%s", s);
int len = strlen(s);
if(s[len-1] != 's') printf("%ss\n", s);
else printf("%ses\n",s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179418/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179418/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[1001];
int n;
scanf("%s\n",&S);
n=strlen(S);
if(S[n-1]=='s'){
printf("%ses\n",S);
}
else{
printf("%ss\n",S);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179469/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179469/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 str[1001], *tmp;
scanf("%s", str);
tmp = str;
while (*tmp)
{
if (!*(tmp + 1))
{
if (*tmp == 's')
{
*(tmp + 1) = 'e';
*(tmp + 2) = 's';
*(tmp + 3) = 0;
}
else
{
*(tmp + 1) = 's';
*(tmp + 2) = 0;
}
break ;
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179526/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179526/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <ctype.h>
#include <limits.h>
#define EPS 1e-10
#define sq(n) ((n)*(n))
#define rep(i,n) for(i=0;i<n;i++)
#define rev(i,n) for(i=n-1;i>=0;i--)
#define sort(a,n) qsort(a,n,sizeof(TYPE),cmp)
#define sort_r(a,n)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179584/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179584/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@mod = dso_local local_unna... |
#include<stdio.h>
int main()
{
double m,n;
int i;
char r[15]={0};
for(;scanf("%lf",&n),n>0;)
{
for(m=128.0,i=0;i<13;i++)
{
if(i==8)
r[i]='.';
else if(n>=m)
r[i]='1',n-=m,m/=2;
else
r[i]='0',m/=2;
}
if(n)
puts("NA");
else
puts(r);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179634/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179634/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, t; scanf("%d %d", &n, &t);
long long int ans = 0;
int pre, nex;
scanf("%d", &pre);
for(int i=1; i<n; i++){
scanf("%d", &nex);
if(nex - pre < t)
ans += (nex - pre);
else
ans += t;
pre = nex;
}
printf("%lld\n", ans+t);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179685/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179685/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <limits.h>
#define min(rhs, lhs) ((rhs) < (lhs) ? (rhs) : (lhs))
typedef struct{
long f, s;
long long t;
} three;
static inline void swap(three *rhs, three *lhs){
three tmp = *rhs;
*rhs = *lhs;
*lhs = tmp;
}
three pq[1000000];
static inline void pqinsert(three elem) {... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179728/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179728/source.c"
target datalayout = "e-m:e-p270: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.three = type { i64,... |
#include<stdio.h>
long long R=1,C=1,H[2000010],N[2000010],id[2000010];
//評価関数(いまはMIN)
int hyouka(int a,int b){
if(C<b)return 1;
if(C<a||b==0)return 0;
return N[H[a]]<N[H[b]]?1:0;
}
//挿入関数
void hin(long long a){
int i=C++;
for(N[H[0]=R]=a;hyouka(0,i/2);i/=2)H[i]=H[i/2];
H[i]=R++;
}
//取り出す関数
int hout(){
int... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179779/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179779/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@R = dso_local local_unname... |
#include <stdio.h>
#include <string.h>
int main(void) {
int len,i,num,j;
char seg[12][9]={"0111111","0000110","1011011","1001111","1100110","1101101","1111101","0100111","1111111","1101111"},dis[9];
while (scanf("%d",&len)!=EOF&&len!=-1) {
strcpy(dis,"0000000");
for (i=0; i<len; i++) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179821/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179821/source.c"
target datalayout = "e-m:e-p270: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.seg = private... |
#include<stdio.h>
#include<stdlib.h>
int max(int a, int b){
return (a<b?b:a);
}
int main(int argc, char *argv[])
{
int testcase = 0;
scanf("%d", &testcase);
while(testcase--){
int i, j;
int m, n, o;
scanf("%d%d%d", &m, &n, &o);
int walks[1+m][1+n];
int prohibited[1+m][1+n][2];
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179872/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179872/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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%2==1)
printf("%d",(n/2)*((n/2)+1));
else
printf("%d",(n/2)*(n/2));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179915/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179915/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
// AtCoder ABC108: A - Pair
// 2019.9.11 bal4u
#include <stdio.h>
int main()
{
int i, j, K, ans;
scanf("%d", &K);
ans = 0; for (i = 1; i <= K; i+=2) {
for (j = 2; j <= K; j+=2) ans++;
}
printf("%d\n", ans);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_179966/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_179966/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 input;
scanf("%d", &input);
int even, odd;
int count = 0;
for (even = 2; even <= input; even += 2) {
for (odd = 1; odd <= input; odd += 2) {
++count;
}
}
printf("%d\n",count);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180014/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180014/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 k,i,j,s=0;
scanf("%d",&k);
for (i=1;i<=k;i=i+2){
for (j=2;j<=k;j=j+2){
s++;
}
}
printf("%d\n",s);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180058/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180058/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main()
{
int n ;
scanf("%d",&n) ;
if( n % 2 == 0 ) {
printf("%d\n",(n/2)*(n/2)) ;
}
else {
printf("%d\n",(n/2)*((n/2)+1)) ;
}
return 0 ;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180100/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180100/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 k;
scanf("%d", &k);
printf ("%d\n", (k / 2) * ((k + 1) / 2));
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180151/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180151/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
int a, b;
scanf("%d", &a);
b = (a+1)/2;
b *= b;
if ( a % 2 ) {
b -= (a+1)/2;
}
printf("%d\n", b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180201/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180201/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <ctype.h>
#include <stdint.h>
#include <string.h>
#include <wchar.h>
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define ABS(a) ((a) < 0 ? -(a) : (a))
#define ABSS(a, b) ((a) > (b) ? (a) -... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180245/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180245/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
long long int gcd(long long int a,long long int b){
long long int i;
while(a!=0 && b!=0){
i=b;
b=a%b;
a=i;
}
return a;
}
int main(){
long long a,b,c;
scanf("%lld%lld",&a,&b);
c=a*b/gcd(a,b);
printf("%lld\n",c);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180289/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180289/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
long int calc_lcm(long int a, long int b){
long int temp = 0;
long int x;
if(a < b){
temp = a;
a = b;
b = temp;
}
x = a * b;
temp = a % b;
while(temp != 0){
a = b;
b = temp;
temp = a % b;
}
return x / b;
}
int main(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180331/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180331/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,kari,i,r;
long long x;
scanf("%d %d",&a,&b);
x=(long long)a*b;
if(a<b){
kari=a;
a=b;
b=kari;
}
r=a%b;
while(r!=0){
a=b;
b=r;
r=a%b;
}
printf("%lld\n",x/b);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180375/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180375/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
int main(){
long a,b,r,tmp;
long ans;
int i;
scanf("%ld %ld",&a,&b);
ans = a * b;
/* 自然数 a > b を確認・入替 */
if( a < b ){
tmp = a;
a = b;
b = tmp;
}
/* ユークリッドの互除法 */
r = a % b;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180418/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180418/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
long a,b,p,q,r;
scanf("%ld %ld",&a,&b);
p=a;
q=b;
while(q!=0){
r=p%q;
p=q;
q=r;
}
printf("%ld",a*b/p);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180461/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180461/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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{
int x, y;
}Place;
int max(int *);
int min(int, int);
int abs(int);
int countSize(Place, Place[], Place);
int howLong(Place, Place);
int countSlope(Place, Place);
int minOthersLong(Place[], Place);
int main(void){
Place field, others[20], p;
int size[20];
int s, t, i;
while... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180504/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180504/source.c"
target datalayout = "e-m:e-p270: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.Place = type { i32,... |
#include <stdio.h>
#include <math.h>
int main(){
double x, y, x1, y1, x2, y2;
scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2);
x = x2 - x1;
y = y2 - y1;
printf("%f\n", sqrt(x * x + y * y));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180548/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180548/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
int main(){
double x1,x2,y1,y2;
double result;
scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
result=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
printf("%.7f",result);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180599/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180599/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){
double a[4],b,y,x;
scanf("%lf%lf%lf%lf",&a[0],&a[1],&a[2],&a[3]);
x=(a[0]-a[2])*(a[0]-a[2])+(a[1]-a[3])*(a[1]-a[3]);
y=sqrt(x);
printf("%lf\n",y);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180641/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180641/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
double y;
} point;
int main(void)
{
struct point point[2];
scanf("%lf %lf %lf %lf",
&point[0].x, &point[0].y, &point[1].x, &point[1].y);
double x = point[0].x - point[1].x;
double y = point[0].y - point[1].y;
print... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180706/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180706/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.point = type { doub... |
#include<stdio.h>
int main(){
int i,n[600]={0};
char s[3],t[]={"ABCO"};
while(scanf("%*d,%s",s)!=EOF){
if(s[1])s[0]='C';
n[s[0]]++;
}
for(i=0;i<4;i++)printf("%d\n",n[t[i]]);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180771/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180771/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
char t[4];
int c[4];
for (i=0; i<4; ++i) c[i]=0;
while (scanf("%d,%s", &n, t) != EOF) {
switch (t[0]) {
case 'A': if (t[1]=='B') c[2]++; else c[0]++; break;
case 'B': c[1]++; break;
case 'O': c[3]++; break;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180814/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180814/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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=0,number;
char blood[3];
int A=0,B=0,O=0,AB=0;
int ret;
while(1){
ret=scanf("%d,%s",&number,blood);
if(ret==EOF){
break;
}
else if(blood[1]=='B'){
AB++;
}
else if(blood[0]=='A'){
A++;
}
else if(blood[0]=='O'){
O++;
}
else{
B++;
}
i++;
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180894/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180894/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
long long getNextRansu(long long x) {
unsigned long long xx=x;
xx^=xx<<13;
xx^=xx>>7;
xx^=xx<<17;
return (long long)xx;
}
int qsort_comp_ll(const void* x,const void* y) {
long long a=*((const long long*)x);
long long b=*((const long long*)y);
if(a>b)return 1;
if(a<b)ret... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180944/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180944/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
// Aizu Vol0 0053: Sum of Prime Numbers
// 2017.7.30
#include <stdio.h>
#include <stdlib.h>
char *gets(char *);
#define MAX 104729 // 10000th prime
#define SQRT 323 // sqrt(MAX)
char table[MAX + 5];
int sum[MAX];
int main()
{
int i, j, n;
char buf[100];
for (i = 2; i <= SQRT; i++) {
if (!table[i]) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_180988/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_180988/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@table = dso_local local_un... |
#include <stdio.h>
#define MAX_N 1000000
int isPrime[ MAX_N + 1 ] = { 0, 0, 1 };
int sum_p[ MAX_N / 2 ] = { 2 }, p = 1;
int main( void ) {
int i, j, n;
for ( i = 3; i <= MAX_N; i += 2 )
isPrime[ i ] = 1;
for ( i = 3; i * i <= MAX_N; i += 2 )
if ( isPrime[ i ] )
for ( j = i * 2; j <= MAX_N; j += i )
i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181044/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181044/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@isPrime = dso_local local_... |
// AOJ 2249: Road Construction
// 2017.11.15 bal4u@uu
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX 16010
typedef struct { int t, node, c; } QUE;
QUE que[MAX]; int qsize;
#define PARENT(i) ((i)>>1)
#define LEFT(i) ((i)<<1)
#define RIGHT(i) (((i)<<1)+1)
void min_heapify(int i)
{
int l, r... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181101/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181101/source.c"
target datalayout = "e-m:e-p270: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.QUE = type { i32, i... |
#include<stdio.h>
int main()
{
int t,n,f,ff,a,k;
char c;
scanf("%d",&t);
while(t--)
{
scanf("%d%*c",&n);
f=0;ff=0;
for(a=1;;a++)
{
scanf("%c",&c);if(c=='\n')break;
if(c=='1'&&f==0)f=a;
if(c=='1'&&f!=0)ff=a;
}
if(ff==... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18116/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18116/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 Y[3][13]={{0, 1,1,1,2},{0,0,0,1,1,1,2,2,2},{0, 1,1,1, 2, 2,2,2,2, 3,3,3,4}};
int X[3][13]={{0,-1,0,1,0},{0,1,2,0,1,2,0,1,2},{0,-1,0,1,-2,-1,0,1,2,-1,0,1,0}};
int d[14][14]={0};
int s[]={5,9,13};
int x[12],y[12],p[12],r=0;
int f(int h,int n){
int i,j,k,c;
if(n==0){
for(i=2;i<12;i++){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181202/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181202/source.c"
target datalayout = "e-m:e-p270: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 local_unname... |
#include<stdio.h>
int e(int a){return a<0?-a:a;}
int main(){
int a,b,c,d;
scanf("%d%d%d%d",&a,&b,&c,&d);
printf("%s",e(a-c)>d&&(e(a-b)>d||e(b-c)>d)?"No":"Yes");
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181260/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181260/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <ctype.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
int a, b, c, d;
scanf("%d %d %d %d ", &a, &b, &c, &d);
if (abs(a - c) <= d || (abs(a - b) <= d && abs(b - c) <= d)) {
printf("Yes");
} else {
printf("No");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181310/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181310/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
int main(){
int a,b,c,d;
scanf("%d%d%d%d",&a,&b,&c,&d);
if((abs(a-b)<=d&&abs(b-c)<=d)||abs(a-c)<=d)puts("Yes");
else puts("No");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181361/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181361/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 length(int x, int y){
if(x>=y) return x-y;
else return y-x;
}
int main(){
int a,b,c,d;
scanf("%d %d %d %d",&a,&b,&c,&d);
if(length(a,c) <= d) printf("Yes\n");
else if(length(a,b) <= d && length(b,c) <= d) printf("Yes\n");
else printf("No\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181411/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181411/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
int b;
int c;
int d;
int ab;
int bc;
int ac;
int count= 0;
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &c);
scanf("%d", &d);
ab = a - b;
bc = b - c;
ac = a - c;
if (ab < 0){
ab *= -1;
}
ab = a - b;
if (bc < 0){
bc *= -1;
}
if (ac < 0){
ac *= -1;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181462/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181462/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 WIDTH 10
#define HEIGHT 10
int main(void) {
int case_num,case_count;
if(scanf("%d",&case_num)!=1)return 1;
for(case_count=0;case_count<case_num;case_count++) {
int search;
int i,j;
int status[HEIGHT];
int answer[HEIGHT];
for(i=0;i<HEIGHT;i++) {
status[i]=0;
for(j=0;j<WIDT... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181512/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181512/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,k,flag=0;
scanf("%d\n",&n);
int score[n][3];
int result[n][3];
for(i=0;i<n;i++){
scanf("%d %d %d\n",&score[i][0],&score[i][1],&score[i][2]);
}
for(i=0;i<n;i++){
for(k=0;k<3;k++){
for(j=0;j<n;j++){
if(i!=j && score[i][k]==score[j][k])flag=1;
}
if(flag==0){
result[i][k]=score[i][k]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181556/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181556/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a1,a2,a3,a4;
scanf("%d %d %d %d",&a1,&a2,&a3,&a4);
if(a1<1 || a2<1 || a3<1 || a4<1 || a1>100 || a2>100 || a3>100 || a3>100)
{
printf("NO");
}
else
if(a1+a2==a3+a4)
{
printf("YES");
}
else if(a1+a3==a2+a4)
{
p... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1816/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1816/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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,k,t=0;
scanf("%d%d",&n,&k);
if((n-1)%(k-1)==0)
t--;
printf("%d",(n-1)/(k-1)+1+t);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181657/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181657/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,ans;
scanf("%d %d",&N,&K);
int a[N];
for(int i=0;i<N;i++)scanf("%d",&a[i]);
ans=(N+K-3)/(K-1);
printf("%d\n",ans);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181729/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181729/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, a;
char c;
int i, ctr;
scanf("%d %d", &N, &K);
for(i=0; i<N; i++)
{
scanf("%d%c", &a, &c);
}
if((N-K)%(K-1) == 0)
ctr = 1+(N-K)/(K-1);
else
ctr = 2+(N-K)/(K-1);
printf("%d\n", ct... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181772/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181772/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 LARGE 2000
#define INF 1000000000
#define MIN(a, b) ((a) < (b) ? (a) : (b))
int V,e;
typedef struct edge{
int from;
int to;
int cost;
}edge;
int BellmanFord(edge E[],int C[]){
int i,j;
int cnt=0;
for(j=0;j<V-1;j++){
for(i=0;i<e;i++){
if(C[E[i].from]!=INF && C[E[i].to] > C[E[i]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181822/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181822/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.edge = type { i32, ... |
#include<stdio.h>
#include<string.h>
int main(void){
int i,n,q,m,d;
int sum[101];
int max,day;
while(1){
scanf("%d%d",&n,&q);
if(!n && !q) break;
memset(sum,0,sizeof(sum));
max = 0;
while(n--){
scanf("%d",&m);
while(m--){
scanf("%d",&d);
sum[d]++;
}
}
for(i=1;i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181866/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181866/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 p[100000]={2};
int i,j,n,c=1,s=0;
for(i=3;i<1000000;i+=2){
s=0;
for(j=0;p[j]*p[j]<=i;j++){
if(i%p[j]==0){
s=1;
break;
}
}
if(s==0){
p[c]=i;
c++;
}
}
p[c]=1000000;
while(scanf("%d",&n)!=EOF){
for(i=0;p[i]<=n;i++);
printf(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_181916/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_181916/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<math.h>
int main()
{
double n,m,i,j,T;
while(~scanf("%lf",&T))
{
while(T--)
{
scanf("%lf %lf",&n,&m);
if(n==0&&m==0)
{
printf("0\n");
}
else if(sqrt(n*n+m*m)==(int)sqrt(n*n+m*m))
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_18196/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_18196/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
const int MAX_V = 1000000;
int prime[1000001];
int main(){
int i,k,n;
int cnt = 0;
for(i = 2; i <= MAX_V; i++){
prime[i] = 1;
}
for(i = 2; i*i <= MAX_V; i++){
if(prime[i]){
for(k = 2*i; k <= MAX_V; k += i){
prime[k] = 0;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182001/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182001/source.c"
target datalayout = "e-m:e-p270: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_V = dso_local local_un... |
#include <stdio.h>
#define MAX_NUM 1000000
int main(void){
int i,j;
int n,a;
int d[MAX_NUM];
while(scanf("%d",&n) != EOF){
a = 0;
for(i=0;i<MAX_NUM;i++) d[i]=1;
d[0] = 0;
d[1] = 0;
for(i=2;i<n+1;i++){
if(d[i]==1){
for(j=i*2;j<n+1;j+=i){
d[j] = 0;
}
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182045/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182045/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i,j;
int n;
int num[1000000];
for(i=0;i<1000000;i++){
num[i]=1;
}
num[0]=num[1]=0;
for(i=2;i<sqrt(1000000);i++){
if(num[i]==1){
for(j=i*i;j<1000000;j+=i) num[j]=0;
}
}
for(i=1;i<100000... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182089/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182089/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 1000000
int main(int argc, const char * argv[]) {
int t[MAX],n,i,j;
for(i=0;i<MAX;i++){
t[i]=1;
}
t[0]=t[1]=0;
for(i=2;i*i<MAX;i++){
if(t[i]==1){
for(j=i*i;j<MAX;j+=i){
t[j]=0;
}
}
}
for(i=1;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_182131/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_182131/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32: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.