/* Title: 100 - The 3n + 1 problem * Purpose: http://uva.onlinejudge.org/external/1/100.pdf * Author: lancetw@gmail.com aka Hsin-lin Cheng * Date: 2009/10/18 * */ #include <stdio.h> #define swap… 更多 →
Lancetw's acm Bloglancetw wrote 1 month ago: /* Title: 100 - The 3n + 1 problem * Purpose: http://uva.onlinejudge.org/external/1/100.pdf * Author … more →
lancetw wrote 1 month ago: CC = gcc CFLAGS = -lm -lcrypt -O2 -pipe -ansi -DONLINE_JUDGE -Wall SOURCE_FILES = $(wildcard *.c) TA … more →
hoisee wrote 4 months ago: //Run Time: 0.008s 近來腦袋不甚靈光,想了頗久Orz 最後是直接拿了一顆骰子,一切就解決啦。 //好像有點犯規XD” #include <stdio.h> c … more →
lancetwacm wrote 5 months ago: #include <stdio.h> main() { int t; int a, b, c, d, e; while(scanf("%d\n", &t) != … more →
lancetwacm wrote 5 months ago: #include <stdio.h> main() { int y; while(scanf("%d", &y) != EOF) { if(((y%4)==0 … more →
lancetwacm wrote 5 months ago: #include <stdio.h> #define s (m*2+d)%3 main() { int m, d; while(scanf("%d %d", & … more →
lancetwacm wrote 5 months ago: #include <stdio.h> main() { int i, j; while(scanf("%d %d", &i , &j) != EOF) … more →
andy0518 wrote 6 months ago: #include<cstdio> struct coordinate { double x, y; }; double MSE(struct coordinate a, struct … more →
andy0518 wrote 6 months ago: #include<cstdio> #include<cstring> int main() { int n, m; int order[101][101], refed … more →
andy0518 wrote 6 months ago: #include<cstdio> int main() { long long int x; while(scanf(“%lld”,&x) != E … more →
andy0518 wrote 6 months ago: #include<cstdio> #include<cstring> int code[128]; void init() { code['B'] = code['F'] … more →
andy0518 wrote 6 months ago: #include<cstdio> #include<cmath> const double PI = acos(-1); double B(double a) { retu … more →
hoisee wrote 1 year ago: //Run Time: 2.830s 一開始先暴搜,用陣列把全部結果存起來 之後就單純print就ok啦XD (DP解待研究…囧) #include <stdio.h> #de … more →
hoisee wrote 1 year ago: //竟然是三星題(驚) 唯一要注意的是鉛直線。 (寫得頗亂,應該可以更精簡吧……) #include <stdio.h> int main() { int … more →
hoisee wrote 1 year ago: 要記得每趟G先生都會在車上XD #include <stdio.h> int min(int, int); int main() { int i, j, k; int n, r, … more →
hoisee wrote 1 year ago: 加個temp就可以輕鬆去掉重複的! //之前想了一堆亂七八糟的方法囧 #include <stdio.h> int t; int n; int sum; int flag; int cou … more →
hoisee wrote 1 year ago: //程式碼看起來頗醜Orz Run time: 2.210 囧 #include <stdio.h> int num[5]; int v[5]; int ans; int check; … more →