垃圾版本 对从2到n 1取模,不为0则是素数,O(N) bool judge(ll n) { if(n==2||n==3) return true; for(int i=2;i ...
分类:
其他好文 时间:
2018-07-23 19:13:34
阅读次数:
152
尼克的任务 TimeLimit:1000MS MemoryLimit:128MB TimeLimit:1000MS MemoryLimit:128MB 64-bit integer IO format:%lld 64-bit integer IO format:%lld 已解决 | 点击收藏 已解决 ...
分类:
其他好文 时间:
2018-07-13 16:15:43
阅读次数:
178
题目描述 We have a sequence of length N consisting of non-negative integers. Consider performing the following operation on this sequence until the larges ...
分类:
其他好文 时间:
2018-07-08 22:08:26
阅读次数:
232
"30. 与所有单词相关联的字串" 这个题做了大概两个小时左右把。。。严重怀疑leetcode的judge机器有问题。同样的代码交出来不同的运行时长,能不能A题还得看运气? 大致思路是,给words生成一关于s的字典,用来记录每个word在s中出现的 所有 位置,注意可能会出现相同的word。然后递 ...
分类:
其他好文 时间:
2018-07-06 01:37:12
阅读次数:
187
Find a multiple Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 8776 Accepted: 3791 Special Judge Description The input contains N natural ...
分类:
其他好文 时间:
2018-07-02 00:16:09
阅读次数:
173
check input device ID: xinput list ;by this you should remeber vitual core keyboard ID(master ID, 3 in my laptop), and AT keyboard ID(13 in my laptop) ...
分类:
其他好文 时间:
2018-06-24 13:09:18
阅读次数:
182
Mishka and Contest #pragma comment(linker, "/STACK:102400000,102400000") #ifndef ONLINE_JUDGE #include "stdafx.h" #else #include<bits/stdc++.h> #endif ...
分类:
其他好文 时间:
2018-06-23 19:11:10
阅读次数:
212
公平划分 若条件满足,则所有数异或和为零,这时候随便分都可以,答案为2^n-2,否则答案为0 #pragma comment(linker, "/STACK:102400000,102400000") #ifndef ONLINE_JUDGE #include "stdafx.h" #else #i ...
分类:
其他好文 时间:
2018-06-21 17:31:02
阅读次数:
274
Watchcow Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 8841 Accepted: 3854 Special Judge Description Bessie's been appointed the new watc ...
分类:
其他好文 时间:
2018-06-18 10:34:11
阅读次数:
158
问题描述: Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Example 2: Note: 解题思路: ...
分类:
其他好文 时间:
2018-06-18 10:26:30
阅读次数:
170