Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
march long ques 4
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
#include<iostream> #include<bits/stdc++.h> #include <cmath> using namespace std; int main() { long long int t,n,k,m; ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> t; while(t--) { cin >> n >> k; int a[n]; vector <int> temp; for(int i=0;i<n;++i){ cin >> a[i]; } for(int p=0;p<n;++p){ for(int i=0;i<n-p;++i){ vector <int> temp; map <int,int> mymap; for(int j=p;j<i+p+1;++j){ temp.push_back(a[j]); mymap[a[j]]++; } m=ceil(((float)k)/(i+1)); cout<<m<<" "; } } } }
g++
1 6 4 1 2 3 4 5 6
Show compiler warnings
[
+
] Compiler args
[
-
]
Show input
Compilation time: 1.42 sec, absolute running time: 0.07 sec, cpu time: 0.01 sec, memory peak: 3 Mb, absolute service time: 1,5 sec
edit mode
|
history
|
discussion
4 2 2 1 1 1 4 2 2 1 1 4 2 2 1 4 2 2 4 2 4