Skip to content

Instantly share code, notes, and snippets.

View splitline's full-sized avatar
[object Object]

\ splitline

[object Object]
View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
int getRank(int n,char *rank,char card[][3]);
int getSuit(int n,char *suit,char card[][3]);
int isAKind(int n,char *rank,char card[][3],int *checked);
int isFull(char *rank,char card[][3],int *checked);
#include <stdio.h>
long long int get_from_addr(long long int* p){
return *p;
}
char* itobs(long long int n, char *ps) {
int size = 8 * sizeof(n);
int i = size -1;
while(i+1) {
ps[i--] = (1 & n) + '0';
n >>= 1;
@splitline
splitline / p1057.c
Last active November 25, 2016 20:08
/*
[Input.txt]
10000
9
Set 0 String Hello, World, RRRRRR.
Set 15 int 2147483647
Set 1000 short 65535
Get 0 int
Get 15 short
#include <stdio.h>
int get_from_addr(int* p){
return *p;
}
int main(){
int m = 10;
int *p = &m;
int n=get_from_addr((int *)p);
int* list[] = {p};
printf("%d", get_from_addr((int *)list[0]));
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#define RANDOM (double)rand()/RAND_MAX
int main()
{
double x,y,z,counter;
long int n=100000000,N=n;
srand(time(NULL));

Day 01. 你很喜歡且歌名中帶有顏色的歌

Day 02. 你很喜歡且歌名中帶有數字的歌

Day 03. 讓你聯想到夏日時光的歌

Day 04. 讓你想起一個你寧可忘記的人的歌

Day 05. 放得超~大聲才過癮的歌

#include <stdio.h>
#include <string.h>
int main(){
char in[10000];
while(gets(in)){
int len=strlen(in),w_num=0;
char symbol=in[len-1],words[1000][100],tmp[100];
in[--len]='\0';
for(int i=0,j=0,p=0;i<=len;i++){
if(in[i]==' '||in[i]=='\0'){
# coding=utf-8
import requests
from bs4 import BeautifulSoup
import json
import urllib2
import os
dirName='wikiArts'
if not os.path.exists(dirName):
os.makedirs(dirName)
artists_url="https://www.wikiart.org/en/alphabet/"
// Name: 黃志仁
// Date: 2017/03/11
// Last Update: 2017/03/11
// Problem statement: Sort and output the input number with occurences
#include <iostream>
#include <fstream>
#include <map>
using namespace std;
int main() {
#include <iostream>
#include <sstream>
#include <cmath>
using namespace std;
int main() {
int y;
while(cin >> y){
long long int bits=4*pow(2,(y-1900)/10);
long double max=log10(2)*bits,f,fLog;
cout << max << endl;