This file contains hidden or 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 <iostream> | |
#include <fstream> | |
#include <vector> | |
#include <utility> | |
using namespace std; | |
char grid[4][4]; | |
bool used[4][4] = {0}; | |
void clear(){//set all used array to false | |
for (int i = 0; i < 4; i++) | |
for (int j = 0; j < 4; j++) |
This file contains hidden or 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
// Author: 黃志仁 | |
// Stu ID: B10530027 | |
// Class: 四不分一甲 | |
// Problem: Word Game | |
#include <iostream> | |
#include <string> | |
#include <fstream> | |
using namespace std; | |
char grid[4][4]; |
This file contains hidden or 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 <iostream> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <time.h> | |
#include <GLUT/glut.h> | |
int g[100][100], used[100][100]; | |
int dx[] = {0,0,1,-1}; | |
int dy[] = {1,-1,0,0}; | |
int n=10; // 迷宮大小 |
This file contains hidden or 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
// ID/Name :B10530027 黃志仁 | |
// Date:March 30.2017 | |
// Last Update:March 30.2017 | |
// Problem statement : Pointer-Advanced | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <sstream> |
This file contains hidden or 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 <iostream> | |
#include <string> | |
#include <vector> | |
#include <sstream> | |
using namespace std; | |
class Pointer { | |
public: | |
Pointer() { | |
_isNull = 0; | |
_vals=new vector<int>(); |
This file contains hidden or 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 <iostream> | |
using namespace std; | |
class Fraction{ | |
public: | |
double getDouble(); | |
void setNumerator(int numerator); | |
void setDenominator(int denominator); | |
void outputReducedFraction(); |
This file contains hidden or 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 <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; |
This file contains hidden or 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
// 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() { |
This file contains hidden or 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
# 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/" |
This file contains hidden or 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 <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'){ |