This commit is contained in:
parent
912f21ab99
commit
e31455a389
|
@ -0,0 +1,3 @@
|
|||
# 标题
|
||||
|
||||
* 内容
|
|
@ -0,0 +1 @@
|
|||
#
|
Binary file not shown.
|
@ -0,0 +1,26 @@
|
|||
#include <iostream>
|
||||
#include <algorithm>
|
||||
using namespace std;
|
||||
bool pan(int a,int b){
|
||||
return a>b;
|
||||
}
|
||||
int main()
|
||||
{
|
||||
int n;
|
||||
cin>>n;
|
||||
int a[100001]={0};
|
||||
for(int i=1;i<=n;i++){
|
||||
cin>>a[i];
|
||||
}
|
||||
|
||||
sort(a+1,a+1+n,pan);
|
||||
|
||||
int ans=n;
|
||||
for(int i=1;i<=n;i++){
|
||||
if(i-1>a[i]){
|
||||
ans=i-1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
cout<<ans;
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,2 @@
|
|||
5
|
||||
7 1 400 2 2
|
|
@ -0,0 +1,2 @@
|
|||
25
|
||||
6 3 7 4 5 3 102520059 6 540383426 0 0 5 2 3 7 2 2 7 0 2 5 7 1 4 2
|
|
@ -0,0 +1,2 @@
|
|||
400
|
||||
26 230 123 170 31 175 77 5 229 107 145 45 117 114 0 58 178 84 151 149 60 118 12 86 39 70 128 101 152 242 6 30 191 189 119 270744729 117 21 175 177 106 103 215 183 124 121 79 19 573363368 215 631518149 223 245 201 55 238 228 100 0 14 164 106 241 115 186 51 228 157 121 145 237 43 178 11 29 154 13 38 90 68 188 167 246 243 359512183 398295499 225 90 139 36 82 214 7 54 111 78 93 68 87755422 60 51 230 55 705178736 126 215 166 8 137 124 776532036 149 50 71 131 180 144 937370163 231 246 23 168 967681095 216 90 943327684 42 107 6 168 162 172 9 210 87 51 122 5 99 154 61 756915667 228 150 158 155789224 19 81 195740084 222 100 135 49 343606042 213 190 90 81 86 155 4 19 26 246247255 548348142 134 205 67 113 4 9 202 6 21 118 189 158 248 58 248 83 148 781999754 246 29 484238046 47 240 33 247 142 125 246 188 229 210 171 932026304 27 332266748 152 197 43 2 153 739000681 38 151 134 192 127 129 214 179 85 150 221 39 238 45 144 140 90 69 232 42 410409117 11 59 2495425 117 234 186631626 57 168 108 136 265204346 244 52 29 40 220 80 93 127 136 105 90 229 51858969 24 141 970925433 138 66 541027284 167 10 237 59 18 33 208 137 233 228 64 229 25533459 188 138 233 181 108 69110699 89 113 44 97 212 140 41 115 157 241 201 21 240 30 75 16 2 139 154 80 21 605539862 129 185 154 233 9 244 161 200 60 105 49 211 184 125 114 18 168 132 232 30 74 93 3 74 213 127 25 169 639806732 17 235 191 193 78 41 986894018 86 55 22963858 988714904 161 185 73 101 0 3 6 139 120 226 177 231 60 205 434433518 92 196 71 312994984 177 40 72 80 97 520982030 214 22 174 185 204 193 236 356684278 12 183 98 74 122 85 207 247 26 218 203 183 209 56 220 58 198 126 215 171 59 10 224 39 454333378 53 114 239 67
|
|
@ -0,0 +1,18 @@
|
|||
## z:\Chao\src\4099_duijiang\test\in.txt
|
||||
2020/05/16 ÖÜÁù 11:05:50.38
|
||||
3
|
||||
-----------------------------------------------
|
||||
Process exited after 130 ms with return value 0
|
||||
|
||||
## z:\Chao\src\4099_duijiang\test\in2.txt
|
||||
2020/05/16 ÖÜÁù 11:05:50.38
|
||||
7
|
||||
-----------------------------------------------
|
||||
Process exited after 90 ms with return value 0
|
||||
|
||||
## z:\Chao\src\4099_duijiang\test\in3.txt
|
||||
2020/05/16 ÖÜÁù 11:05:50.38
|
||||
163
|
||||
-----------------------------------------------
|
||||
Process exited after 70 ms with return value 0
|
||||
|
Loading…
Reference in New Issue