CHEATBEATER's recent timeline updates
CHEATBEATER

CHEATBEATER

🏢  Java开发
V2EX member #73301, joined on 2014-09-08 18:31:30 +08:00
Per CHEATBEATER's settings, the topics list is hidden
Deals info, including closed deals, is not hidden
CHEATBEATER's recent replies
Dec 26, 2017
Replied to a topic by CHEATBEATER Java Java 类内部 Json 处理 效率问题
@all 看到部门代码里各种 json 转换来转换去才有的这个想法,看来是我多虑了,感谢大家的回复。
Dec 26, 2017
Replied to a topic by CHEATBEATER Java Java 类内部 Json 处理 效率问题
@seki 要和其它微服务交互的,自己改数据传输格式肯定是不行的。又听到了 protobuf,学习了。
May 25, 2016
Replied to a topic by CHEATBEATER Python 请教个关于 Tkinter 的问题
@Dwayne update 也不行,还是要等控制台全部输出完状态信息才能在 Text 中显示
@LedChang 是的,自动水题的爬虫
@zjqzxc 应该是要用多线程了
@leavic 第一次写 GUI 程序,没考虑到线程的问题,用 Tkinter 也是感觉这个好像很简单易懂,十分感谢详细的回答
谢谢大家的帮助
RE和访问效率无关…
效率低的话是TLE (time limit exceed)
目测 数组越界了,可以尝试把数组开的大一点
Mar 5, 2015
Replied to a topic by leassy 程序员 一个算法问题,求高手来答
Mar 5, 2015
Replied to a topic by mopig 新手求助 操作问题:V2EX 主题中怎么插入图片?
<img src=" " class="imgly" style="max-width: 590px;" border="0">
Mar 5, 2015
Replied to a topic by leassy 程序员 一个算法问题,求高手来答
#include <cstdio>

int num[1000];

int main() {
int tot;
while (scanf("%d", &tot) != EOF) {
for (int i = 1; i <= tot; i++)
scanf("%d", num+i);
int pos, out;
scanf("%d%d", &pos, &out);
int L = pos - (out-1)/2, R = pos + (out-1)/2;
if (L < 1) R += (out-1)/2 - pos + 1;
if (R > tot) L -= (out-1)/2 + pos - tot;
L = L > 1 ? L : 1;
R = R < tot ? R : tot;
for (int i = L; i <= R; i++) {
printf("%d", num[i]);
if (i != R) putchar(' ');
}
puts("");
}
return 0;
}
// 如果是分页的话感觉要有问题, 毕竟要考虑最后一页,不过符合题主的样例 = =
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3134 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 18ms · UTC 13:06 · PVG 21:06 · LAX 06:06 · JFK 09:06
♥ Do have faith in what you're doing.