This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define MAXN 1000; | |
#define MAXM 1000; | |
int n, m; | |
arr[MAXN][MAXM] | |
void escargo(int n,int m){ | |
int x=n, y=1; | |
int cnt = n*m; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(){ | |
int i,j,n,diff,cnt=1; | |
int s=0; e=-1; | |
scanf("%d", &n); | |
diff=n; | |
while(cnt<=n*n){ | |
for(i=1;i<-diff;i++) arr[s][++e]=cnt++; | |
diff--; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
int n, i, j, map[21][21]; | |
scanf("%d", &n); | |
for(i = 1; i <= n; i++) | |
scanf("%d", &map[i][1]); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
int n, i, j, d[50][50], m = 1, a, b; | |
scanf("%d", &n); | |
for(i = a = 0, b = n / 2; i < n; i++) | |
{ | |
for(j = 0; j < n; j++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main(a,b,i){char*c=malloc(100);scanf("%s\n%d %d",c,&a,&b);for(i=a-1;i<b;)printf("%c",*(c+i++));} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i,n,a[1001];main(){scanf("%d",&n);for(;i<n;)scanf("%d",&a[i++]);for(i--;i>=0;)printf("%d ",a[i--]);} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <math.h> | |
typedef struct { | |
int x, y; | |
}point; | |
int main(){ | |
point p1, p2; | |
double i; | |
scanf("%d %d %d %d", &p1.x, &p1.y, &p2.x, &p2.y); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int fibo(int n, int a, int b){ | |
if (n==0) { | |
return a; | |
} | |
fibo(n-1, b,(a+b)%10009); | |
} | |
int main(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void){ | |
int n, arr[100][100]; | |
scanf("%d",&n); | |
for(int i=0;i<n;i++){ | |
for(int j=0;j<n;j++) | |
arr[i][j]= n*i+(i%2?j+1:n-j); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
typedef struct Student { | |
int no; | |
char name[10]; | |
}student; | |
void insertSt (student *p, student t, int *n) { | |
int i; | |
for (i=0; i<*n && p[i].no<=t.no; i++) if(p[i].no==t.no) return; | |
for (int j=*n-1; j>=i; j--) p[j+1]=p[j]; |
OlderNewer