(暂时)最短代码

P3131 [USACO16JAN] Subsequences Summing to Sevens S

@[tiger0132](/space/show?uid=20791) %%% 压行之神
by hellomath @ 2018-08-27 23:07:57


@[larryzhong](/space/show?uid=20438) fAKe,我太蒻了来水题刷存在感>_<
by tiger0132 @ 2018-08-27 23:09:06


@[tiger0132](/space/show?uid=20791) 我好像看不太懂。。。
by hellomath @ 2018-08-27 23:15:59


@[larryzhong](/space/show?uid=20438) 看不懂++
by xiangling @ 2018-08-27 23:17:16


@[rainman](/space/show?uid=55804) @[larryzhong](/space/show?uid=20438) 其实和这份代码的意思是一样的: ```cpp #include <bits/stdc++.h> using namespace std; int a[7], ans, y, i, x; char buf[233]; int main() { gets(buf); while (~scanf("%d", &x)) { i++; y = (y + x) % 7; if (a[y]) { ans = max(ans, i - a[y]); } else { a[y] = i; } } printf("%d", ans); } ```
by tiger0132 @ 2018-08-27 23:28:17


@[tiger0132](/space/show?uid=20791) 语言蒟蒻告辞
by xiangling @ 2018-08-27 23:42:43


@[tiger0132](/space/show?uid=20791) emm....不够短啊qwq
by かなで @ 2018-08-28 03:07:25


像窝这样的蒟蒻都能随便优化个2B
by かなで @ 2018-08-28 03:07:48


新纪录:110B ```c a[7],z,y,i;main(x){for(gets(&x);~scanf("%d",&x);x=a[y=(y+x)%7],x?z=z>i-x?z:i-x:(a[y]=i))i++;printf("%d",z);} ``` 求破qwq
by かなで @ 2018-08-28 03:09:15


@[かなで](/space/show?uid=100018) orz
by AutumnTripod906 @ 2018-08-28 07:16:05


| 下一页