| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 129821 | 欧阳俊懿 | 初级冒泡排序 | C++ | Wrong Answer | 1 MS | 276 KB | 511 | 2025-09-06 16:33:19 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,a[2001],b; cin>>n; for(int i=0;i<n;i++)cin>>a[i]; for(int i=0;i<n;i++){ for(int j=0;j<n-1-i;j++){ if(a[i]<a[i+1]){ b=a[i]; a[j]=a[j+1]; a[j+1]=b; } } } for(int i=0;i<n;i++)cout<<a[i]<<' '; return 0; }
------Input------
100 710844621 832331786 719165900 196251414 131660009 908884938 773348756 457940717 523525398 991592781 145325130 152181633 356807348 124547296 466667263 568830284 629838821 719563125 641301408 247289001 466142664 512035712 231352503 666045769 887982085 680762004 587994079 293993962 774874831 855482273 805733283 810242949 731295960 359665887 337748410 68881324 66792893 700954842 393745265 939295611 564884357 41466353 233100349 42606778 271850312 201468313 470251804 2653269 425701645 165910014 58
------Answer-----
991592781 991238259 952153428 939295611 919789561 908884938 908324289 887982085 875341570 855482273 855324349 832331786 829195974 820125284 812980655 810242949 805733283 786766425 774874831 773348756 731295960 730018810 719563125 719165900 710844621 705550958 700954842 680762004 666045769 653053703 651573367 641301408 629838821 619343867 616946852 595972318 587994079 581267814 568830284 564884357 562081711 551088332 542830708 540235095 535915366 523525398 512035712 487327028 470251804 466667263
------Your output-----
393745265 218446680 66792893 321929318 84870242 939295611 66792893 487327028 564884357 302449452 115143942 66792893 125840012 41466353 202290045 233100349 439420609 420774456 282459952 41466353 93038050 42606778 8101899 41466353 271850312 212866244 41466353 201468313 135771339 41466353 470251804 381437940 41466353 2653269 651573367 542830708 464034244 228761388 425701645 110909168 2653269 425892105 389231311 206967887 154587330 165910014 2653269 581267814 203872119 2653269 2653269 203872119 6193