码迷,mamicode.com
首页 > 其他好文 > 详细

此题要求前k小答案,我们首先把k个inf加入小根堆

时间:2015-05-19 00:50:04      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:

#include <iostream>#include <algorithm>#include <cstdio>#include <cstring>#include <cstdlib>#include <cmath>#define mp make_pair#define pa pair<int,int>#define M 500005#include <queue>#define inf 0x3f3f3f3f#define fi first#define se secondusing namespace std;priority_queue<pa> pq;int q[10],ans[M];struct node{ int ma[10],mi[10],d[10],l,r;}t[M];int root,n,m,k,now;void read(int &tmp){ tmp=0; char ch=getchar(); int fu=1; for (;ch<‘0‘||ch>‘9‘;ch=getchar()) if (ch==‘-‘) fu=-1; for (;ch>=‘0‘&&ch<=‘9‘;ch=getchar()) tmp=tmp*10+ch-‘0‘; tmp*=fu;}bool cmp(node a,node b){ return a.d[now]<b.d[now];}void Update(int x){ int l=t[x].l,r=t[x].r; for (int i=0;i<k;i++) { t[x].mi[i]=min(t[x].mi[i],min(t[l].mi[i],t[r].mi[i])); t[x].ma[i]=max(t[x].ma[i],max(t[l].ma[i],t[r].ma[i])); }}int Build(int l,int r,int d){ now=d; int mid=(l+r)>>1; nth_element(t+1+l,t+1+mid,t+1+r,cmp); if (mid!=l) t[mid].l=Build(l,mid-1,(d+1)%k); else t[mid].l=0; if (mid!=r) t[mid].r=Build(mid+1,r,(d+1)%k); else t[mid].r=0; Update(mid); return mid;}int Sqr(int x){ return x*x;}int Dis(int x){ int ans=0; for (int i=0;i<k;i++) ans+=Sqr(t[x].d[i]-q[i]); return ans;}int Get(int x){ int ans=0; for (int i=0;i<k;i++) { if (q[i]<t[x].mi[i]) ans+=Sqr(t[x].mi[i]-q[i]); if (q[i]>t[x].ma[i]) ans+=Sqr(q[i]-t[x].ma[i]); } return ans;}void Query(int x){ if (!x) return; int d0=Dis(x),dl=Get(t[x].l),dr=Get(t[x].r); if (d0<pq.top().fi) { pq.pop(); pq.push(mp(d0,x)); } if (dl<dr) { if (dl<pq.top().fi) Query(t[x].l); if (dr<pq.top().fi) Query(t[x].r); } else { if (dr<pq.top().fi) Query(t[x].r); if (dl<pq.top().fi) Query(t[x].l); }}int main(){ while (scanf("%d%d",&n,&k)!=EOF) { for (int j=0;j<k;j++) t[0].ma[j]=-inf,t[0].mi[j]=inf; for (int i=1;i<=n;i++) for (int j=0;j<k;j++) { read(t[i].d[j]); t[i].ma[j]=t[i].mi[j]=t[i].d[j]; } root=Build(1,n,0); int Q; read(Q); while (Q--) { for (int i=0;i<k;i++) read(q[i]); read(m); printf("the closest %d points are:\n",m); for (int i=1;i<=m;i++) pq.push(mp(inf,0)); Query(root); for (int i=1;i<=m;i++) ans[i]=pq.top().se,pq.pop(); for (int i=m;i;i--) { for (int j=0;j<k;j++) { if (j) printf(" "); printf("%d",t[ans[i]].d[j]); } printf("\n"); } } } return 0; }


http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2478
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2479
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2480
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2481
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2482
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2483
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2484
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2485
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2486
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2487
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2488
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2489
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2490
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2491
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2492
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2493
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2494
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2495
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2496
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2497
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2498
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2499
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2500
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2501
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2502
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2503
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2504
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2505
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2506
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2507
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2508
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2509
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2510
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2511
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2512
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2513
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2514
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2515
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2516
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2517
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2518
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2519
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2520
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2521
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2522
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2523
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2524
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2525
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2526
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2527
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2528
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2529
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2530
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2531
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2532
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2533
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2534
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2535
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2536
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2537
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2538
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2539
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2540
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2541
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2542
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2543
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2544
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2545
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2546
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2547
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2548
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2549
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2550
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2551
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2552
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2553
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2554
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2555
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2556
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2557
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2558
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2559
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2560
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2561
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2562
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2563
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2564
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2565
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2566
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2567
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2568
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2569
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2570
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2571
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2572
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2573
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2574
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2575
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2576
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2577
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2578
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2579
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2580
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2581
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2582
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2583
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2584
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2585
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2586
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2587
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2588
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2589
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2590
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2591
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2592
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2593
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2594
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2595
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2596
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2597
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2598
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2599
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2600
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2601
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2602
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2603
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2604
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2605
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2606
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2607
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2608
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2609
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2610
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2611
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2612
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2613
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2614
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2615
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2616
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2617
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2618
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2619
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2620
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2621
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2622
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2623
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2624
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2625
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2626
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2627
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2628
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2629
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2630
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2631
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2632
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2633
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2634
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2635
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2636
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2637
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2638
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2639
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2640
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2641
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2642
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2643
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2644
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2645
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2646
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2647
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2648
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2649
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2650
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2651
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2652
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2653
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2654
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2655
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2656
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2657
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2658
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2659
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2660
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2661
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2662
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2663
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2664
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2665
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2666
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2667
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2668
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2669
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2670
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2671
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2672
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2673
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2674
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2675
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2677
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2678
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2679
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2680
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2681
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2682
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2683
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2684
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2685
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2686
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2687
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2688
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2689
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2690
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2691
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2692
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2693
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2694
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2695
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2696
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2697
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2698
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2699
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2700
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2701
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2702
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2703
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2704
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2705
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2706
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2707
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2708
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2709
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2710
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2711
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2712
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2713
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2714
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2715
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2716
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2717
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2718
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2719
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2720
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2721
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2722
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2723
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2724
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2725
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2726
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2727
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2728
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2729
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2730
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2731
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2732
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2733
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2734
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2735
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2736
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2737
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2738
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2739
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2740
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2741
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2742
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2743
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2744
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2745
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2746
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2747
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2748
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2749
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2750
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2751
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2752
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2753
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2754
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2755
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2756
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2757
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2758
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2759
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2760
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2761
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2762
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2763
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2764
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2765
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2766
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2767
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2768
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2769
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2770
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2771
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2772
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2773
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2774
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2775
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2776
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2777
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2778
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2779
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2780
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2781
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2782
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2783
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2784
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2785
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2786
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2787
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2788
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2789
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2790
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2791
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2792
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2793
http://u.xzw.com/index.php?app=public&mod=Profile&act=index&uid=2794

技术分享

此题要求前k小答案,我们首先把k个inf加入小根堆

标签:

原文地址:http://blog.csdn.net/steven0213/article/details/45832861

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!