█████████ ████ ███░░░░░███ ░░███ ███ ░░░ ██████ ███████ ██████ ██████ ░███ ███░░███ ███░░███ ███░░███ ███░░███ ░███ ░███ ░███░███ ░███ ░███████ ░███ ░███ ░░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░░█████████ ░░██████ ░░████████░░██████ ░░██████ ░░░░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░░

Envío 2621

Problema 0x9d - ¿Está ordenado?

  • Autor: DanielP
  • Fecha: 2021-01-16 20:46:59 UTC (Hace alrededor de 3 años)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      main.cpp:21:6: error: non-void function 'main' should return a value [-Wreturn-type]
            return;
            ^
1 error generated.

                    
#2
Error de compilación
                      main.cpp:21:6: error: non-void function 'main' should return a value [-Wreturn-type]
            return;
            ^
1 error generated.

                    
#3
Error de compilación
                      main.cpp:21:6: error: non-void function 'main' should return a value [-Wreturn-type]
            return;
            ^
1 error generated.

                    
#4
Error de compilación
                      main.cpp:21:6: error: non-void function 'main' should return a value [-Wreturn-type]
            return;
            ^
1 error generated.

                    
#5
Error de compilación
                      main.cpp:21:6: error: non-void function 'main' should return a value [-Wreturn-type]
            return;
            ^
1 error generated.

                    
#6
Error de compilación
                      main.cpp:21:6: error: non-void function 'main' should return a value [-Wreturn-type]
            return;
            ^
1 error generated.

                    
#7
Error de compilación
                      main.cpp:21:6: error: non-void function 'main' should return a value [-Wreturn-type]
            return;
            ^
1 error generated.

                    
#8
Error de compilación
                      main.cpp:21:6: error: non-void function 'main' should return a value [-Wreturn-type]
            return;
            ^
1 error generated.

                    
#9
Error de compilación
                      main.cpp:21:6: error: non-void function 'main' should return a value [-Wreturn-type]
            return;
            ^
1 error generated.

                    
#10
Error de compilación
                      main.cpp:21:6: error: non-void function 'main' should return a value [-Wreturn-type]
            return;
            ^
1 error generated.

                    
#11
Error de compilación
                      main.cpp:21:6: error: non-void function 'main' should return a value [-Wreturn-type]
            return;
            ^
1 error generated.

                    
#12
Error de compilación
                      main.cpp:21:6: error: non-void function 'main' should return a value [-Wreturn-type]
            return;
            ^
1 error generated.

                    
Puntos totales: 0 / 100

Código

/// 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 n;
	cin>>n;
	vi v(n);
	for(int i=0;i<n;i++) cin>>v[i];
	for(int i=1;i<n;i++){
	    if(v[i]<v[i-1])
	    cout<<"Desordenado\n";
	    return;
	}
	cout<<"Ordenado\n";
}