原创 通用版1.N - Bullseye
#include <stdio.h> #include <stdlib.h> #include <math.h> double f(double x) { if(x<=9)return 100; if(x<=36)ret
原创 通用版1.A - The 3n + 1 problem
#include <stdio.h> #include <stdlib.h> int f(int x) { int i=0; while(1){ if(x==1)break; if(x%2=
原创 pip用清華源配置各種包
清華源: pip install -i https://pypi.tuna.tsinghua.edu.cn/simple sklearn <——安裝sklearn包
原创 安裝ubuntu之後,win7開機前的畫面變成紫色花屏的解決辦法
在/etc/default裏的grub文件中修改兩部分: 1.修改啓動順序 sudo vim /etc/default/grub進入文件,GRUB_DEFAULT=0的作用是設置默認啓動項,這裏默認啓動的是ubuntu。我的電腦裏win
原创 水題堆4.M - 悼念512汶川大地震遇難同胞——珍惜現在,感恩生活
#include <stdio.h> #include <string.h> int max(int a,int b) { return a>b?a:b; } int main() { int C,n,m,i,j,k;
原创 水題堆4.K - 悼念512汶川大地震遇難同胞——來生一起走(再看
#include <stdio.h> #include <string.h> int prime(int x) { int i; if(x<=1)return 0; for(i=2;i<=x/i;i++){
原创 通用版1.F - Robot Motion (深搜
#include <stdio.h> #include <string.h> int r,c,n,record[11][11],f[11][11],step; char s[11][11]; void dfs(int x,int y) {
原创 通用版1.L - Delta-wave
#include <stdio.h> #include <stdlib.h> #include <math.h> int main() { int a,b,x1,y1,z1,x2,y2,z2,res,n,m; while(
原创 通用版1.P - Reduced ID Numbers
#include <stdio.h> #include <string.h> int s[350],f[1000001]; int main() { int t,n,i,j,flag; scanf("%d",&t);
原创 通用版1.M - 枚舉答案能不能做?
#include <stdio.h> #include <string.h> int main() { int i,n,t; char s[10000]; while(gets(s)){ if(s
原创 通用版1.C - Edge
#include <stdio.h> #include <string.h> int main() { int i,j,n; char s[250],x; while(~scanf("%s",s)){
原创 通用版1.B - Candy Sharing Game
#include <stdio.h> #include <stdlib.h> int s[1000000]; int main() { int n,i,k,flag,a,b; while(scanf("%d",&n)&&n
原创 通用版1.S - Counterfeit Dollar
#include <stdio.h> #include <string.h> #include <math.h> int main()//這個題一直以爲是固定放四個,結果一直WA,唉 { int s[15],f[15],i,j,t
原创 水題堆4.L - 悼念512汶川大地震遇難同胞——重建希望小學
#include <stdio.h> #include <stdlib.h> int main() { int c,n,i; long long s[35]; s[1]=1; s[2]=3; fo
原创 通用版1.I - 輾轉相除法求最大公約數
#include <stdio.h> #include <stdlib.h> int main() { int n,a,t,u,v,r,s,w; scanf("%d",&w); while(w--){