資源簡(jiǎn)介
2019PAT甲級(jí)秋季 題目及滿分代碼
代碼片段和文件信息
#include
#include
#include
#include
#define?ac?cin.tie(0);cin.sync_with_stdio(0);
using?namespace?std;
string?s;
typedef?pair?PAIR;
vector?ans;
int?n?k?m;
bool?cmp(const?PAIR?&a?const?PAIR?&b)?{
????if?(a.first?!=?b.first)
????????return?a.first?????else
????????return?a.second?}
long?long?gcd(int?a?int?b)?{
????return?b?==?0???a?:?gcd(b?a?%?b);
}
bool?check(int?a)?{
????if?(a?<=?2)
????????return?false;
????for?(int?i?=?2;?i?*?i?<=?a;?i++)
????????if?(a?%?i?==?0)
????????????return?false;
????return?true;
}
void?dfs(int?lev?int?res)?{
????if?(lev?==?k)?{
????????if?(!res)?{
????????????long?long?tmp?=?stoll(s)?+?1;
????????????int?nn?=?0;
????????????while?(tmp)?{
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????1717??2020-12-02?21:08??2019秋季甲級(jí)\19秋季1.cpp
?????文件????????1367??2020-12-02?21:10??2019秋季甲級(jí)\19秋季2.cpp
?????文件?????????947??2020-12-02?09:22??2019秋季甲級(jí)\19秋季3.cpp
?????文件????????1311??2020-12-02?20:49??2019秋季甲級(jí)\19秋季4.cpp
?????文件??????147645??2020-12-02?21:59??2019秋季甲級(jí)\A.pdf
?????文件??????161499??2020-12-02?22:00??2019秋季甲級(jí)\B.pdf
?????文件??????244232??2020-12-02?22:00??2019秋季甲級(jí)\C.pdf
?????文件??????144748??2020-12-02?22:00??2019秋季甲級(jí)\D.pdf
評(píng)論
共有 條評(píng)論