Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Error de compilación
main.c:2:9: fatal error: 'bits/stdc++.h' file not found #include<bits/stdc++.h> ^~~~~~~~~~~~~~~ 1 error generated. |
||
#2 |
Error de compilación
main.c:2:9: fatal error: 'bits/stdc++.h' file not found #include<bits/stdc++.h> ^~~~~~~~~~~~~~~ 1 error generated. |
||
#3 |
Error de compilación
main.c:2:9: fatal error: 'bits/stdc++.h' file not found #include<bits/stdc++.h> ^~~~~~~~~~~~~~~ 1 error generated. |
||
#4 |
Error de compilación
main.c:2:9: fatal error: 'bits/stdc++.h' file not found #include<bits/stdc++.h> ^~~~~~~~~~~~~~~ 1 error generated. |
||
#5 |
Error de compilación
main.c:2:9: fatal error: 'bits/stdc++.h' file not found #include<bits/stdc++.h> ^~~~~~~~~~~~~~~ 1 error generated. |
||
#6 |
Error de compilación
main.c:2:9: fatal error: 'bits/stdc++.h' file not found #include<bits/stdc++.h> ^~~~~~~~~~~~~~~ 1 error generated. |
||
#7 |
Error de compilación
main.c:2:9: fatal error: 'bits/stdc++.h' file not found #include<bits/stdc++.h> ^~~~~~~~~~~~~~~ 1 error generated. |
||
#8 |
Error de compilación
main.c:2:9: fatal error: 'bits/stdc++.h' file not found #include<bits/stdc++.h> ^~~~~~~~~~~~~~~ 1 error generated. |
||
#9 |
Error de compilación
main.c:2:9: fatal error: 'bits/stdc++.h' file not found #include<bits/stdc++.h> ^~~~~~~~~~~~~~~ 1 error generated. |
||
#10 |
Error de compilación
main.c:2:9: fatal error: 'bits/stdc++.h' file not found #include<bits/stdc++.h> ^~~~~~~~~~~~~~~ 1 error generated. |
/// Write by Daniel Perez .PERAPRO #include<bits/stdc++.h> using namespace std; #define fast_io ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); using vi=vector<int>; #define pb push_back typedef long long ll; int main(){ fast_io; int testcases; cin>>testcases; int t=testcases; while(testcases--){ cout<<"Case #"<<abs(t-testcases)<<":"; int n; cin>>n; vector<int> v(n); for(int i=0;i<n;i++) cin>>v[i]; vector<int> ans(n); int curh=v[n-1]; for(int i=n-1;i>-1;i--){ if(v[i]>=curh){ curh=v[i]; ans[i]=-1; }else{ ans[i]=curh; } } for(int i=0;i<n;i++){ cout<<" "<<ans[i]; } cout<<endl; } }