結果

問題 No.2648 [Cherry 6th Tune D] 一次元の馬
コンテスト
ユーザー vjudge1
提出日時 2025-11-20 16:44:46
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 845 bytes
コンパイル時間 746 ms
コンパイル使用メモリ 85,008 KB
実行使用メモリ 19,016 KB
最終ジャッジ日時 2025-11-20 16:44:54
合計ジャッジ時間 7,767 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other TLE * 1 -- * 37
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <unordered_map>
#include <algorithm>
#include <vector>

using namespace std;


bool isnotSorted(std::vector<int> temp){

    for(int i = 1 ; i < temp.size(); ++i){
        
        if(temp[i] <= temp[i-1]){
            return true;
        }
    }
    return false;

}
int main()
{
    int x;
    cin>>x;
    while(x > 0){
        std::vector<int> temp;
        int whistle(0);
        int y;
        cin>>y;
        while(y > 0){
            int l;
            cin>>l;
            temp.push_back(l);
            y--;
        }

        int minimum,maximum;
        
        while(isnotSorted(temp)){

            for(int i = 0 ; i < temp.size() ; ++i){
                temp[i] += i;
            }
            whistle++;
        }


        cout<<whistle<<'\n';

        x--;
    }
    return 0;
}
0