發表文章

目前顯示的是 2011的文章

My SPOJ status

pfiesteria's user data

Current world rank: #5136

(2 points)

Country: TAIWAN, PROVINCE OF CHINA

Modify user data
My job application

Problems solved Solutions submitted Solutions accepted Wrong Answer Compile Error Runtime Error Time Limit Exceeded
21 178 53 43 7 16 59

History of submissions
(plaintext version)

List of solved classical problems:
ADDREV GNY07A PRIME1
CANDY JULKA RESN04
CANTON NHAY SAMER08F
DIVSUM NSTEPS SBANK
FASHION ONP SQRBR
FCTRL PALIN TEST
FCTRL2 PIR TOANDFRO

TODO list of classical problems:

UVa : 11705 (Grasshopper) « Solved Programming Problems

UVa : 11705 (Grasshopper) « Solved Programming Problems:
//用link的Code來釐清題意,之後寫出以下AC Code.




C++ code colored by C++2HTML





#include <cstdlib> #include <iostream> using namespace std; int g_input[50][50], g_dis[50][50]; char ga[50][50]; int jump(char direct, int y, int x, int row, int col) { if('N' == direct) { if(y - g_input[y][x] >= 0) { return g_dis[y - g_input[y][x]][x]; } else return 0; } else if('W' == direct) { if(x - g_input[y][x] >= 0) { return g_dis[y][x - g_input[y][x]]; } else return 0; } else if('E' == direct) { if(x + g_input[y][x] < col) { return g_dis[y][x + g_input[y][x]]; } else return 0; } else if('S' == direct) { if(y + g_input[y][x] < row) { return g…