106 条题解
-
0
huyue LV 3 @ 18 年前
懂了,算对了
-
018 年前@
注意第一次排序后每个人序号是按从大到小,1..n,也就是说第一次d【i】中放的是
已经排好序的序列,他们的下标是1..n -
018 年前@
只因为写错一个i....WA无数次
-
018 年前@
晕啊啊,要仔细啊~~~~
-
018 年前@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0ms纪念一下,做简单题一定要仔细
-
018 年前@
一次AC 庆祝下,这个模拟题 真的是要细心细心更细心
-
018 年前@
这道题最终只需输出编号,编号是什么,编号就是w[i]中的i,编号1的人就是对应最初w[1]的人!!!其他没什么了
当初没倒过来,开一堆数组存人和号-_-||
-
018 年前@
同一个程序 昨天交10分 今天交AC.....
昨天VIJOS太扯了 -
018 年前@
终于过了……一共交了38次……
-
018 年前@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 181ms
├ 测试数据 08:答案正确... 166ms
├ 测试数据 09:答案正确... 259ms
├ 测试数据 10:答案正确... 556ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:1162ms汗!Vijos评测机升级啦,昨天最后一个点还1xxxms,今天快了一倍啊
交了28次,终于过了。。。。 -
018 年前@
竟然还有k=0的……让我郁闷了一次
-
018 年前@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0ms.......我被ws到了..............
-
018 年前@
编译通过...
├ 测试数据 01:答案正确... 0ms
├ 测试数据 02:答案正确... 0ms
├ 测试数据 03:答案正确... 0ms
├ 测试数据 04:答案正确... 0ms
├ 测试数据 05:答案正确... 0ms
├ 测试数据 06:答案正确... 0ms
├ 测试数据 07:答案正确... 0ms
├ 测试数据 08:答案正确... 0ms
├ 测试数据 09:答案正确... 0ms
├ 测试数据 10:答案正确... 0ms
---|---|---|---|---|---|---|---|-
Accepted 有效得分:100 有效耗时:0ms -
018 年前@
第6个测试数据错误..
k=0的话 没有数据 就是空白(嘿嘿 看了测试数据) -
-16 年前@
Python 天下第一,不接受反驳
-
-18 年前@
编译成功
Free Pascal Compiler version 3.0.0 [2015/11/16] for i386
Copyright (c) 1993-2015 by Florian Klaempfl and others
Target OS: Win32 for i386
Compiling foo.pas
foo.pas(3,21) Note: Local variable "f" not used
Linking foo.exe
69 lines compiled, 0.1 sec, 28208 bytes code, 1268 bytes data
1 note(s) issued
测试数据 #0: Accepted, time = 0 ms, mem = 1200 KiB, score = 10
测试数据 #1: Accepted, time = 15 ms, mem = 1200 KiB, score = 10
测试数据 #2: Accepted, time = 0 ms, mem = 1200 KiB, score = 10
测试数据 #3: Accepted, time = 0 ms, mem = 1200 KiB, score = 10
测试数据 #4: Accepted, time = 0 ms, mem = 1204 KiB, score = 10
测试数据 #5: Accepted, time = 15 ms, mem = 1200 KiB, score = 10
测试数据 #6: Accepted, time = 15 ms, mem = 1200 KiB, score = 10
测试数据 #7: Accepted, time = 15 ms, mem = 1204 KiB, score = 10
测试数据 #8: Accepted, time = 15 ms, mem = 1196 KiB, score = 10
测试数据 #9: Accepted, time = 31 ms, mem = 1200 KiB, score = 10
Accepted, time = 106 ms, mem = 1204 KiB, score = 100 -
-18 年前@
5次过,两次作死忘改倒数第三行,两次没有做好稳定性。QAQ代码70行。
'''pascal
var a , aa : array [ 1 .. 50000 ] of longint ;
w : array [ 0 .. 10 ] of longint ;
b , c , d , e , f : longint ;
procedure swap ( var m , n : longint ) ;
var i : longint ;
begin
i := m ; m := n ; n := i ;
end ;
procedure kp ( m , n : longint ) ;
var i , j , mid : longint ;
begin
i := m ; j := n ; mid := a [ ( i + j ) div 2 ] ;
repeat
while a [ i ] > mid do inc ( i ) ;
while a [ j ] < mid do dec ( j ) ;
if i <= j then
begin
swap ( a [ i ] , a [ j ] ) ;
swap ( aa [ i ] , aa [ j ] ) ;
inc ( i ) ; dec ( j ) ;
end ;
until i > j ;
if m < j then kp ( m , j ) ;
if i < n then kp ( i , n ) ;
end ;
procedure kkp ( m , n : longint ) ;
var i , j , mid : longint ;
begin
i := m ; j := n ; mid := aa [ ( i + j ) div 2 ] ;
repeat
while aa [ i ] < mid do inc ( i ) ;
while aa [ j ] > mid do dec ( j ) ;
if i <= j then
begin
swap ( a [ i ] , a [ j ] ) ;
swap ( aa [ i ] , aa [ j ] ) ;
inc ( i ) ; dec ( j ) ;
end ;
until i > j ;
if m < j then kkp ( m , j ) ;
if i < n then kkp ( i , n ) ;
end ;
begin
read ( b , c ) ;
for d := 1 to 10 do
read ( w [ d ] ) ;
for d := 1 to b do
begin
read ( a [ d ] ) ;
aa [ d ] := d ;
end ;
kp ( 1 , b ) ; e := 1 ;
for d := 2 to b do
if a [ d ] <> a [ e ] then
begin
kkp ( e , d - 1 ) ;
e := d ;
end ;
for d := 1 to b do
a [ d ] := a [ d ] + w [ ( d - 1 ) mod 10 + 1 ] ;
kp ( 1 , b ) ; e := 1 ;
for d := 2 to b do
if a [ d ] <> a [ e ] then
begin
kkp ( e , d - 1 ) ;
e := d ;
end ; if e <> d then kkp ( e , d ) ;
for d := 1 to c do
write ( aa [ d ] , ' ' ) ;
end .
''' -
-118 年前@
此题正在维护中…………晕
-
-118 年前@
无语中, 只过了5个点
-
-115 年前@
2 次 Qsort
模拟题