- 博客(12)
- 收藏
- 关注
原创 POJ-1069
#include <bits/stdc++.h> using namespace std; #define maxn 110 int n, m, flag, cnt; int a[15], b[15]; bool mp[maxn][maxn]; void showmap() { putchar('\n'); for(int i = 1; i <= 2 * n;...
2020-04-21 22:18:35 178
原创 分数变小数
#include <cstdio> #include <cstring> using namespace std; int div[105], remain[105], idx[1005]; bool cir; void fracToDecimal(int a, int b) { printf("%d", a / b); if(a % b == 0) ret...
2020-04-05 17:16:54 158
原创 【POJ 3087】Shuffle'm Up
#include <cstdio> #include <map> #include <cstring> using namespace std; struct ptrCmp { bool operator()(const char * s1, const char * s2) const { return strcmp(s1, s...
2020-04-01 13:02:13 95
原创 日期差
#include <cstdio> using namespace std; int d1, d2, month[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int main() { while(scanf("%d%d", &d1, &d2) != EOF){ if(d1 ...
2020-03-29 08:57:35 113
原创 最短路径
#include <cstdio> #include <cstring> #include <stack> using namespace std; #define maxn 105 int n, cnt = 0, lowcost[maxn], head[maxn]; struct edge { int to, w, next; }e[maxn * ma...
2020-03-28 20:56:11 447 1
原创 整除
#include <cstdio> #include <cmath> #include <algorithm> #include <cstring> using namespace std; int cnt[1005], fact[100]; int solve(int n, int a) { int k = 0; for(int i...
2020-03-28 17:51:30 239
原创 2的幂次方
#include <iostream> #include <cmath> using namespace std; int n; void pw(int x) { if(!x) return; if(x == 1) { cout << "2(0)"; return; } if(x == 2) { ...
2020-03-28 15:43:12 268
原创 计算表达式
#include <cstdio> #include <cstdlib> #include <cctype> using namespace std; #define MAXSIZE 100 struct seq { char st[MAXSIZE]; int top; }; struct op { int data[MAXSIZE]; ...
2020-03-28 15:02:46 158
原创 Powerful Calculator
#include <cstdio> #include <cstdlib> #include <cstring> using namespace std; char sa[500], sb[500]; int siga = 1, sigb = 1, flag; struct bign { int d[1000]; int len; }; bign ...
2020-03-28 11:34:23 130
原创 二次方程计算器
#include <iostream> #include <cstdio> #include <string> #include <cctype> #include <cmath> using namespace std; string str; int a, b, c, i, flag, f; int getdigit(char *s)...
2020-03-27 18:41:36 361
原创 棋盘游戏
#include <cstdio> #include <queue> #include <algorithm> using namespace std; int a[6][6], sx, sy, ex, ey; int dx[4] = {1, -1, 0, 0}, dy[4] = {0, 0, 1, -1}; bool vis[6][6]; struct nod...
2020-03-27 18:34:57 219
原创 OJ
#define lowbit(x) x & (-x) #include #define ll long long int n; const int maxn = 1000005; int a[maxn] = {0}; ll sum1[maxn], sum2[maxn]; int Q[5]; void updata(int i, int k) { int x }@TOC
2020-03-27 11:03:35 222
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人