-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
862663f
commit 10b0c4d
Showing
163 changed files
with
1,766,223 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# CS-BAOYAN-2022 | ||
计算机保研交流群(QQ群号:605176069) | ||
**全国最大非商业用爱交流计算机保研交流群**(QQ群号:605176069) |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# include<algorithm> | ||
# include<vector> | ||
# include<iostream> | ||
using namespace std; | ||
typedef struct{int id;int h;} student; | ||
bool operator <(const student& a,const student & b){return (a.h)<(b.h);} | ||
|
||
int n,m,k,tall=0; | ||
vector<student> stu; | ||
vector<int> highid; | ||
void init(){ | ||
student temp; | ||
cin >> n >> m >> k; | ||
for(int i=0;i<n;i++){ | ||
temp.id = i; | ||
cin >> temp.h; | ||
stu.push_back(temp); | ||
} | ||
} | ||
void pick(){ | ||
for(int i = 0;i<=n-m;i++){ //排序 | ||
sort(stu.begin(),stu.begin()+m+i); | ||
for(int j = 0;j<=i;j++){//检查个头 | ||
if(stu[j+m-1].h-stu[j].h<=k){ | ||
for(int y=j;y<j+m;y++){//找最大id | ||
if(stu[y].id>tall) tall = stu[y].id; | ||
} | ||
cout<<tall+1<<endl; | ||
return; | ||
} | ||
} | ||
} | ||
cout<<"impossible"<<endl; | ||
} | ||
int main(){ | ||
init(); | ||
pick(); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# include <stdio.h> | ||
# include <iostream> | ||
# define MAX 1000000007 | ||
# define ll long long | ||
|
||
using namespace std; | ||
|
||
ll n,m,a,*b; | ||
|
||
|
||
long long mul(long long a,long long b,long long mod) { | ||
long long res = 0; | ||
while(b > 0){ | ||
if( (b&1) != 0) // 二进制最低位是1 --> 加上 a的 2^i 倍, 快速幂是乘上a的2^i ) | ||
res = ( res + a) % mod; | ||
a = (a << 1) % mod; // a = a * 2 a随着b中二进制位数而扩大 每次 扩大两倍。 | ||
b >>= 1; // b -> b/2 右移 去掉最后一位 因为当前最后一位我们用完了, | ||
} | ||
return res; | ||
} | ||
|
||
|
||
|
||
long long pow(long long a,long long n,long long mod) { | ||
long long res = 1; | ||
while(n > 0) { | ||
if(n & 1) | ||
res = mul(res,a,mod); | ||
a = mul(a,a,mod); | ||
n >>= 1; | ||
} | ||
return res; | ||
} | ||
|
||
|
||
void init(){ | ||
cin>>n>>m>>a; | ||
b = new ll[m+1]; | ||
for(ll i=0;i<=m;i++){ | ||
cin>>b[i]; | ||
} | ||
} | ||
|
||
|
||
ll f(ll x){ | ||
ll result=0; | ||
for(ll i=0;i<=m;i++){ | ||
result+=mul(b[i],pow(x,i,MAX),MAX); | ||
result%=MAX; | ||
} | ||
return result; | ||
} | ||
|
||
ll s(){ | ||
ll result=0; | ||
for(ll i = 0;i<=n;i++){ | ||
result+=mul(pow(a,i,MAX),f(i),MAX); | ||
result%=MAX; | ||
} | ||
return result; | ||
} | ||
|
||
int main(){ | ||
init(); | ||
cout<<s()<<endl; | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
87 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
90 60 0 | ||
12 8 12 12 12 12 12 12 37 52 12 56 12 12 12 12 12 59 60 12 12 12 8 12 12 12 28 12 12 12 12 15 51 12 12 12 16 13 12 23 12 12 12 12 12 12 21 32 12 12 12 49 12 12 12 12 12 12 12 34 12 12 12 23 12 9 12 41 12 12 19 61 28 12 12 37 67 12 12 12 41 12 12 12 44 12 12 12 12 12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1202 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1988 850 2520 | ||
2411 2768 4348 2125 4445 2187 2381 2429 2330 4444 4854 2493 413 2434 3860 4220 3165 2061 4069 3005 3233 4453 2999 3854 2764 4299 290 3213 3757 2869 463 2702 3370 2297 4025 3367 4341 3284 1777 1977 4496 2612 2319 1419 2522 2973 3745 4941 1527 244 2747 3545 2704 2393 2101 4002 4686 4333 1536 412 2441 4564 3512 2811 1657 1348 4929 4013 3080 2752 3441 964 1619 2108 4116 3383 3312 3084 2539 2706 4445 4055 3873 1621 780 1224 2678 2659 4092 4266 4367 645 3559 3987 1437 1862 4425 3673 3740 71 3630 2800 3603 2790 3460 3194 1420 69 3304 3898 2512 2470 4096 2972 1115 2354 2554 1738 4966 3919 2500 916 4562 3059 4053 873 1398 1490 4418 2214 608 3400 2794 155 618 3460 998 1505 3056 3275 2666 2483 2090 1126 2756 4625 2948 2827 4208 1921 2917 4041 1611 226 3664 4465 3637 2195 2262 1961 2348 3031 1642 310 1393 3195 476 2830 2390 3929 4079 2993 2304 3064 3636 4114 1601 2449 3530 763 2123 45 1184 3239 3925 2921 3207 1375 3888 1340 2173 3010 3456 4388 4443 3402 4657 2361 4017 3145 2181 3391 2638 4807 2510 1385 3728 2169 3900 4217 4166 3896 4161 4190 2633 2167 4531 127 4663 1360 3509 4249 2291 4303 2738 4037 4991 3937 3266 2973 3300 2797 2805 2976 610 4302 3600 2525 673 2401 4700 2979 4182 4073 2569 2580 1917 22 2366 2835 2652 2570 2847 3475 3365 1655 3003 2051 4310 2887 4089 3446 2760 3453 3164 3077 3612 3108 3287 618 634 3741 4051 3963 4375 1731 4871 3122 4903 2126 2574 3947 3609 4909 2409 4207 2159 3880 704 1351 1900 1049 2087 3710 3701 3475 2471 4200 441 3581 3596 3798 1798 3757 4449 1440 344 3111 2629 1675 2777 3035 2845 2238 3014 3605 2220 3384 3081 4001 4518 3864 4123 3710 2955 3147 4229 4537 1632 2468 566 2805 3673 1971 3617 795 3951 4485 4333 4045 2853 2222 3634 3640 2753 3827 1292 1483 186 1637 2530 481 2076 2315 2600 705 100 3378 2326 3751 554 1610 3054 4510 904 2016 4493 2793 3587 3163 2615 3280 3476 4819 3700 3827 575 3842 2940 3812 3782 794 4419 136 1436 159 3814 876 1939 4602 623 4203 2429 727 179 4018 4462 63 261 3674 2297 101 703 3885 2332 2699 3448 4817 2850 2811 4753 4664 54 3619 2749 3861 1845 4153 2690 2481 4192 2124 2531 1253 587 2062 4878 474 3410 3162 4528 1554 1549 1922 2500 2212 3065 3550 4179 2267 3004 4407 1946 3263 1200 2587 4247 1083 3636 183 4457 3166 939 2954 2474 2544 4047 467 4662 2350 4547 2816 2850 2752 1990 2591 1074 4332 3 3003 444 2247 291 4027 2605 3627 3888 3419 2093 3347 2652 4066 3319 949 2736 4284 4330 2885 1530 3431 2874 170 372 2417 2581 1399 4070 3613 3307 3685 4504 2732 2007 1286 2089 2159 2783 4789 1316 2837 117 1281 2123 2994 3736 4891 2145 1029 4120 3326 2607 3298 2899 1836 464 1276 3520 674 2682 4021 4338 3838 4236 816 2934 2799 4523 3829 67 1834 2169 2315 4890 2121 3141 4411 3624 527 4395 3299 931 2344 4335 3418 4268 892 2744 4852 3582 2432 4100 1123 1379 1191 46 4032 3838 920 2237 2627 2756 2406 3611 2189 3199 3583 2225 2292 3683 2388 3987 2600 4561 253 3146 2161 3343 3942 239 3889 4078 3029 4970 1996 3632 3345 4665 322 1829 4347 2644 3994 2162 2242 4386 1504 3174 2780 2043 3504 3831 287 2721 353 4200 2413 955 3276 3095 2835 4057 2330 2452 1608 2746 3250 840 4521 3452 4776 2607 3860 4340 1906 1674 1370 3809 4412 4162 2714 2907 3372 2050 2897 4959 4502 4392 2875 3203 3469 143 3792 3654 4685 1633 1207 2751 1609 374 3431 2602 2717 4822 477 4123 3229 3728 2843 336 4152 4394 2480 3776 2496 3054 1115 1246 3903 3910 885 2385 2263 4107 2785 118 2042 2583 4437 4679 1451 225 2938 2718 3015 3307 4425 2395 483 3334 3617 2100 2755 1560 215 3498 3162 3253 4022 3458 3138 594 1441 4342 2895 4471 3871 3226 4359 1926 4239 2628 2674 2355 3325 3480 3249 4621 3492 351 83 2388 3799 2421 3316 41 4051 3708 735 381 2364 441 1458 2134 3334 4421 2327 4207 3009 2282 4378 4437 4099 2568 2327 2328 3394 3222 3543 3384 1376 2996 3727 2895 3449 4404 532 3796 1060 4731 4553 59 2498 4688 310 3417 4005 2868 2165 2871 4291 4333 3168 2095 507 267 4018 4502 4658 4096 4318 4220 3630 3107 2700 686 4041 3700 3060 2945 3371 2895 770 1257 625 3739 3827 4254 3654 4977 1248 141 3169 339 201 2380 1291 4856 3858 988 9 4794 3795 4216 1167 3991 3273 3514 3459 2346 3116 66 1285 2522 2793 2984 2369 408 2168 3182 2793 1831 3998 3916 3042 3090 2250 4048 4466 963 3815 3532 608 2057 1913 4461 3402 3039 3652 2141 4042 3200 3921 1932 1709 4224 2464 2188 401 4205 2676 4257 673 862 2123 1972 4968 4279 2931 817 3453 2219 2161 1856 2849 3982 3953 2894 4058 3836 1942 719 3915 1464 3694 2112 3031 3982 2359 2525 2435 4833 1212 2363 2448 440 1703 910 4791 4450 1756 1550 2295 3812 2429 3083 2315 1762 3821 2507 3077 4353 2722 1483 1073 2955 3097 2962 1039 4311 2521 3100 2515 4669 3247 2984 791 439 1570 2739 1614 3086 4080 3847 1664 3154 3462 3440 2400 2160 2581 2414 4951 4452 2024 2220 3347 3207 3707 1843 4834 3261 3601 369 2409 2987 141 1781 4311 78 3190 2218 3556 1736 1493 2516 2193 1552 4035 1307 2835 4934 2914 2184 3642 3664 3908 919 2072 2556 2857 3972 3721 3650 1110 3399 3132 2927 2556 3534 3710 3875 1896 22 593 3907 3762 2402 4175 3077 4131 1003 1281 1170 2346 4448 3521 1480 3278 4451 2100 2131 1804 3429 568 1982 2137 3512 4335 3483 3400 3314 1796 2097 3464 2477 2703 4479 3279 4343 1596 1983 4575 2218 1622 2158 2476 3812 2309 4251 2766 158 4330 4303 2948 3777 4021 2666 2615 3487 1468 3102 3708 2707 4113 4438 144 4103 2299 1547 1386 2229 2260 408 4375 2240 4014 4009 4738 702 4153 1596 908 2296 4170 2627 3684 3019 1487 3192 4444 4540 4159 1489 4913 99 4535 2928 3099 2586 1084 3496 3099 3914 1241 1853 4354 4452 293 3883 3069 1842 4090 4221 3608 3876 1523 2334 4481 2322 3307 21 4150 1292 4159 2750 866 3814 2760 3255 3460 3617 4173 2450 3556 4850 3069 1550 4858 4511 2511 2989 3126 3048 2836 3051 2652 4275 2545 726 1594 2074 3480 2376 3869 4923 2414 3987 2710 3274 3039 1714 2445 2964 3684 1174 3229 2554 2595 4189 950 1809 3620 4775 4411 3729 3863 2615 3435 2239 2486 2934 3266 136 3535 1143 2827 3665 1989 1922 3107 2995 548 4989 628 2196 3096 3949 939 164 3666 2663 3548 2813 2670 3306 2632 2309 3517 3632 2539 2147 3166 3759 697 3674 2061 4407 3126 2060 969 3448 3777 2621 3135 2391 2579 2534 4031 4381 927 1358 2465 1784 4114 2877 2793 2501 4197 3050 4472 2256 1911 3751 2384 2732 3044 3564 3265 4328 4563 2801 2976 3424 1908 2703 4654 1985 4153 104 1718 2484 785 680 3180 3440 2827 2351 4907 4394 3308 2894 2276 3110 3479 2596 3440 4352 2351 780 4464 2670 4534 3639 4343 2638 4551 2220 2259 898 4686 4891 1806 4449 2771 3990 2721 2403 904 4012 4024 4348 3926 1628 4937 3744 1329 1449 3160 1448 3165 3050 3070 4893 2179 554 2857 4298 3298 2964 4431 2516 4139 696 3890 2900 2800 709 1925 4952 2508 4383 4518 2222 459 3567 3293 3947 3275 3554 4299 3862 4134 2093 2534 91 36 3552 4086 3002 3708 1342 2707 2866 1079 4147 1948 1733 2138 2831 426 3331 1099 4365 3883 3669 3018 3822 1 2772 2817 2803 3159 4137 1057 3528 3455 1491 3768 2679 3131 4273 3293 3709 1124 3063 4927 3003 1254 996 2940 4203 896 4030 3611 2916 191 2818 4633 4678 3686 2627 2543 2647 2183 583 2700 4575 1112 2927 3575 3823 4330 2167 3751 1805 4345 3008 4054 3866 402 3843 2606 2947 3880 605 2524 4935 3132 4356 2838 3637 1394 3253 4009 2869 2578 1453 597 1259 3627 1990 3950 3371 1077 4711 3576 5000 2155 3151 3501 4707 2728 854 2122 4717 3730 4644 181 1345 123 3148 2300 1251 4507 1806 2563 470 3670 788 3266 4227 4285 491 2614 3296 3571 202 3321 3651 1848 4400 4838 3439 1860 2395 3889 2990 4111 2103 2495 3444 4506 4278 3897 3799 1144 3665 2099 4713 189 2494 3487 1946 1932 1987 4355 3523 3975 3755 2813 1731 2415 3547 4521 3451 4062 2558 1706 2038 2629 2549 167 3435 3385 3735 4191 40 3584 603 3857 2892 4007 3389 4512 2316 362 501 1147 2188 2136 3139 4547 2448 2231 1931 1218 3918 3270 3413 2730 585 733 3318 2453 43 2889 4456 1257 4666 1581 4301 558 397 2986 3695 834 3916 1406 4296 3485 3008 2418 1666 3736 2915 3634 3247 3244 3303 3111 4263 2637 1652 1906 1376 2485 710 88 817 2866 4296 3377 1686 4327 2472 1411 4874 4592 4471 4327 575 4088 1759 4537 3001 2202 2263 4405 3976 955 2764 2293 3431 338 3480 1246 2146 3418 3197 3212 1392 2426 2818 271 2328 4131 4447 4143 683 2738 2393 3570 4604 1582 4918 4853 3430 9 3259 2723 1428 3905 4833 4500 3222 3102 3125 4652 2361 679 3495 2545 4194 408 3996 3848 2682 4003 97 1159 1402 3921 954 2738 4908 855 2984 2784 958 2399 2196 3057 2089 2098 1969 3812 3664 2238 2784 4448 2665 2910 3203 3140 3972 257 2273 839 4108 1025 1328 1203 2429 3205 4566 3845 2102 23 2503 3095 4718 2156 3755 786 145 1929 3895 3037 3392 2627 2098 4240 1833 1896 722 4517 324 2184 3338 2226 2853 2261 4512 3428 2104 2412 3084 3054 1997 4334 4263 4451 2095 2617 4019 2154 3240 4562 4520 3540 4279 1558 3454 4124 3672 3128 2358 3477 3247 3228 3600 4358 611 3135 3277 4879 2090 848 4552 69 3752 3263 203 2490 1521 3910 710 2348 943 370 3547 1577 797 2994 4386 4611 956 3148 2934 4887 3528 3231 2790 3316 4180 3558 4999 2775 4851 354 3228 2967 2901 3352 3929 4520 4541 3168 4084 2175 3936 3767 4341 1770 2812 1872 3817 4363 3069 3607 2962 3289 4778 2932 1897 3620 2323 2516 1619 2259 2190 4145 700 4069 1170 4757 3330 648 925 3413 2104 996 2967 4289 2769 586 2159 2892 4811 4110 2563 2692 4864 1393 470 283 2147 2368 3591 2353 3169 3865 4771 2966 3048 2597 1651 4261 3509 4005 4163 2614 2508 4247 4934 4541 2453 2360 4498 2808 3636 2664 2190 413 4002 4340 343 4170 4188 2758 4409 2426 4989 2117 3434 2645 3825 3821 2780 4577 3673 1797 469 355 2623 589 2053 4676 2493 2815 4125 4300 4239 2341 1765 2022 3094 2659 2691 3930 2197 2573 1823 2033 1099 540 3082 1891 4456 4145 1809 2450 1607 3426 924 1337 2477 1086 2516 546 1725 1288 2428 83 4334 3814 258 3224 4037 2578 3573 2474 3352 4375 4234 3937 4077 2792 4381 4131 2563 4972 2098 368 3139 1950 2844 3739 1096 1151 4327 4178 3893 4437 2590 2884 2580 4322 3388 3096 2361 2478 4424 4598 4102 3269 1055 3219 2140 3072 2448 3783 559 556 2905 3450 351 1835 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1092 |
Oops, something went wrong.