
技巧
cugzyc
Coding && Reading.
展开
-
牛客——齐神和心美的游戏
链接:https://www.nowcoder.com/acm/contest/127/A来源:牛客网题目描述某一天齐木楠雄和照桥心美一起玩找数字的游戏,游戏规则是这样的,桌子上有n个的卡片,每一张卡片上都有一个独一无二的数字,心美从中选择三次(可以重复选择同一张卡片),然后得到一个数为三张卡片上数字之和,如果卡片上的数字之和恰好为k,那么心美获胜,否则齐神获胜。如果心美获胜了,齐神只能乖乖的听从...原创 2018-06-18 21:31:23 · 308 阅读 · 0 评论 -
【codeforces 894A】QAQ
A. QAQ【题目链接】time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output"QAQ" is a word to denote an expression of crying. Imagine "Q" as eye...原创 2018-07-24 20:04:30 · 194 阅读 · 0 评论 -
Seek the Name, Seek the Fame 【hash/KMP】
The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-born babies. They seek the name, and at the same time seek th...原创 2018-08-19 12:05:17 · 229 阅读 · 0 评论 -
B - Crazy Search 【hash】
给定一个字符串,其中含有不同的字母数量为m,现在求这个字符串中有多少个长度为n且长的互不相同的字符子串 举个例子, n=3, m=4 ,字符串 "daababac". 长度为3的不同的子串分别是: "daa"; "aab"; "aba"; "bab"; "bac". 因此, 答案是5. Input第一行是两个整数n,m,,一个空格隔开。 接下来一行是我们要解决的字符串.( 你可以原创 2018-08-17 20:50:15 · 158 阅读 · 0 评论 -
离散化
离散化详细介绍<--请戳模板#include <bits/stdc++.h>using namespace std;vector<int> v;int a[100];int main() { int n, x; cin>>n; for(int i=1;i<=n;++i) { cin>&...原创 2018-08-21 16:23:33 · 130 阅读 · 0 评论