
算法实战
啥都不会的小白
渡河
展开
-
小白的算法实战(一):两个数的最大公约数
//穷举法#include <stdio.h>#include <stdlib.h>int main(){ int a,b,r; printf("input two numbers:"); scanf("%d %d",&a,&b); if(a<b) r=a; else r...原创 2019-02-28 15:17:13 · 265 阅读 · 0 评论 -
小白的算法实战(二):交通灯问题
#include <iostream>#include <string>using namespace std;class Node{public: int color; string name; Node() { color=0; }};int main(){ int i,j,cnt_co...原创 2019-02-28 15:14:58 · 1416 阅读 · 0 评论