上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 39 下一页
摘要: # A. The Contest 想一想就知道,提交的时间无所谓,所以我们选择全部做完后的第一个时间间隔提交即可 ```cpp #include using namespace std; #define int long long int read() { int x = 0, f = 1, ch 阅读全文
posted @ 2023-07-10 15:40 PHarr 阅读(19) 评论(0) 推荐(0)
摘要: # A - Sandglass2 ```cpp #include using namespace std; #define int long long int32_t main() { int a , b; cin >> a >> b; cout using namespace std; #defi 阅读全文
posted @ 2023-06-27 14:14 PHarr 阅读(15) 评论(0) 推荐(0)
摘要: # A - Air Conditioner ```cpp #include using namespace std; int main() { int x; cin >> x; if( x >= 30 ) cout using namespace std; #define int long long 阅读全文
posted @ 2023-06-23 19:52 PHarr 阅读(105) 评论(0) 推荐(0)
摘要: [重现](https://ac.nowcoder.com/acm/contest/59729) # A-数数 ```cpp #include using namespace std; int main(){ string s; set cnt; cin >> s; for( auto c : s ) 阅读全文
posted @ 2023-06-06 21:24 PHarr 阅读(20) 评论(0) 推荐(0)
摘要: 首先对字符串首先要求一个前缀函数$\pi[i]$。$\pi[i]$简单来说就是子串$s[0\dots i]$最长的相等的真前缀与真后缀的长度。 ```cpp vector prefix_function(const string &s) { int n = s.size(); vector pi(n 阅读全文
posted @ 2023-06-01 22:21 PHarr 阅读(24) 评论(0) 推荐(0)
摘要: # A 最小的数字 ```cpp #include using namespace std; #define int long long int32_t main() { ios::sync_with_stdio(false), cin.tie(0), cout.tie(0); int n; cin 阅读全文
posted @ 2023-06-01 22:18 PHarr 阅读(25) 评论(0) 推荐(0)
摘要: # **A - Similar String** ```cpp #include using namespace std; #define int long long int32_t main() { int n; string s , t; cin >> n >> s >> t; for( int 阅读全文
posted @ 2023-06-01 10:55 PHarr 阅读(122) 评论(0) 推荐(0)
摘要: # A. Another A+B Problem 暴力枚举出所有的情况,然后特判一下 ```cpp #include using namespace std; set res; int t; string a , b , c = "????????"; #define f(d) ((d[0]-'0' 阅读全文
posted @ 2023-05-31 20:17 PHarr 阅读(94) 评论(0) 推荐(0)
摘要: # A - 算法竞赛 ```cpp #include using namespace std; #define int long long void solve(){ int st , n , ed; cin >> st >> n; map cnt; for( int i = 1 , x ; i > 阅读全文
posted @ 2023-05-31 12:20 PHarr 阅读(428) 评论(0) 推荐(0)
摘要: # A. Grasshopper on a Line ```cpp #include using namespace std; #define int long long void solve(){ int x , k; cin >> x >> k; if( x % k == 0 ){ cout > 阅读全文
posted @ 2023-05-30 21:45 PHarr 阅读(36) 评论(0) 推荐(1)
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 39 下一页