![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
uva-judge
nkfustKai
这个作者很懒,什么都没留下…
展开
-
UVA 1368 DNA Consensus String
Problemhttp://write.blog.csdn.net/postlistuva 1368 DNA Consensus String#include<iostream>typedef enum{A=0,C=1,G=2,T=3}e;char DNAChar[4] = {'A','C','G','T'};using namespace std;int main(){ int原创 2016-08-31 17:30:04 · 302 阅读 · 0 评论 -
UVA 10340 All in All
Problemhttps://uva.onlinejudge.org/external/103/10340.pdfThinking其實只是在t字串裡有沒有s字串裡的所有字母, 且順序關係要和s一樣 比如說: 1. t = abcde s = abe 是合法的 2. t = abcde s = dc 就不合法 雖然t字串裡有s的所有字母,但是順序關係不同Solution#include<原创 2016-09-02 13:39:37 · 478 阅读 · 0 评论 -
UVA 202 Repeating Decimals
Problemhttps://uva.onlinejudge.org/external/2/202.pdfThinking直式除法(詳細TODO)Solution#include<iostream>#include<cstdio>#include<string>using namespace std;void solve(int a,int b){ int marked[3005] =原创 2016-09-02 12:46:20 · 333 阅读 · 0 评论 -
UVA 1585 Score
Problemhttps://uva.onlinejudge.org/external/15/1585.pdfThinking這題遇到連續O則會開始加總一個會慢慢遞增的數字, 此數字再遇到X時變回1, 此題很簡單, 會記錄此題的原因是我不小心把題目想得太複雜了#include<iostream>using namespace std;void solve(string str){ int原创 2016-09-02 03:59:20 · 260 阅读 · 0 评论 -
UVA 10474 Where is the Marble?
Problemhttps://uva.onlinejudge.org/external/104/10474.pdfSolution#include<iostream>#define MAX_NUM 10005 // 最大數字為10000using namespace std;int main(){ int N,Q,case_num = 0; //若N和Q為0結束原创 2016-09-01 22:51:24 · 475 阅读 · 0 评论 -
UVA 10062 Tell me the frequencies!
Problemhttps://uva.onlinejudge.org/external/100/10062.pdfSolution//UVa 10062 Tell me the frequencies!#include<iostream>#include<string>using namespace std;void solve(string str){ int count[130]原创 2016-09-01 06:07:09 · 1560 阅读 · 0 评论 -
UVA 10018 Reverse and Add
Problemhttps://uva.onlinejudge.org/external/100/10018.pdfSolution#include<iostream>using namespace std;int reverse(unsigned int num){ unsigned int rev = 0; while(num > 0) { rev =原创 2016-08-31 21:29:49 · 524 阅读 · 0 评论 -
UVA 272 TEX Quotes
#include #include #include using namespace std;int main(int argc, char *argv[]){ string str; bool flag = true; while(getline(cin , str)) { for(int i = 0 ; str[i] != '\0'原创 2016-07-16 11:54:53 · 353 阅读 · 0 评论 -
UVA 1225 Digit Counting
Problem第一個輸入為testcase次數 第二個數字為n代表從1寫到n寫在一起總共有幾個0-9總共出現多少次, example: 1. n = 3, 123這串數字裡0-9總共出現多少次 2. n = 13, 12345678910111213這串數字裡0-9總共出現多少次Solution// UVa:1225-Digit Counting#include<iostream>u原创 2016-08-28 22:43:07 · 729 阅读 · 0 评论 -
UVA 455 Periodic Strings
Problemhttps://uva.onlinejudge.org/external/4/455.pdfThinking使用窮舉法, 先測測看cycle=1合不合法在測2測3…測到跟字串一樣長為止, 若有重複的cycle取最小Solution#include<iostream>#include<string>using namespace std;bool isMatch(int cycle原创 2016-09-02 15:56:31 · 380 阅读 · 0 评论