Skip to content

Instantly share code, notes, and snippets.

View joemmanuel's full-sized avatar

Joemmanuel Ponce joemmanuel

View GitHub Profile
#include <stdio.h>
int main()
{
int a,b;
int c;
scanf("%d %d", &a,&b);
c = a+b;
printf("%d", c);
#include <stdio.h>
int main()
{
long long a,b;
long long c;
scanf("%lld %lld", &a,&b);
c = a+b;
printf("%lld", c);
}
#include <stdio.h>
#include <ctype.h>
int main ()
{
int i=0;
char str[500],c;
gets(str);
while (str[i])
{
c=str[i];
#include<stdio.h>
int main(){
int year,casos;
scanf("%ld",&casos);
while(casos>0){
scanf("%ld",&year);
if (((year % 4)==0) && ((year % 100)!=0 || (year % 400)==0))
printf("S\n");
else
printf("N\n");
#include <algorithm>
#include <stdio.h>
using namespace std;
int arr[50];
int n,i,a,b,c;
int main()
{
scanf("%d",&n);
for (i=0;i<n;i++)
{
@joemmanuel
joemmanuel / conciertolira.cpp
Created September 30, 2013 14:45
Solución de spleensarethebest al concierto del Dr.Lira
#include <iostream>
#include <cstdio>
using namespace std;
int songs, iniv, maxim;
int slist[55], dp[50005][55];
int main()
{
@joemmanuel
joemmanuel / supernieves-bt.cpp
Created September 30, 2013 15:45
Solución de charlyhlms a Super Nieves Bros.
#include <iostream>
using namespace std;
int vis[102][102];
int color;
int n, m;
int xf, yf;
char mapa[102][102];
@joemmanuel
joemmanuel / supernievesbros-bfs.cpp
Last active December 24, 2015 07:48
Solución de spleensarethebest a Super Nieves Bros
#include <iostream>
#include <cstdio>
#include <queue>
using namespace std;
struct coord
{
int x, y;
}np;
@joemmanuel
joemmanuel / subprimos-diego_futbolm.cpp
Created October 8, 2013 14:36
Solución de subprimos de diego_futbolm
#include <cstdlib>
#include <iostream>
#include <string.h>
using namespace std;
bool esprimo[100005];
int fact[100005], n;
bool es_primo(int n)
{
int si;
si = 1;
#include <iostream>
#include <cstdio>
using namespace std;
int height, width, movs, opnum, opin;
int ops[10], board[105][105], nboard[105][105];
void adjust()
{