| Task: | Conspiracies everywhere |
| Sender: | CPLX |
| Submission time: | 2024-11-16 12:48:35 +0200 |
| Language: | C++ (C++17) |
| Status: | READY |
| Result: | TIME LIMIT EXCEEDED |
| test | verdict | time | |
|---|---|---|---|
| #1 | ACCEPTED | 0.00 s | details |
| #2 | ACCEPTED | 0.00 s | details |
| #3 | TIME LIMIT EXCEEDED | -- | details |
| #4 | ACCEPTED | 0.00 s | details |
| #5 | TIME LIMIT EXCEEDED | -- | details |
| #6 | ACCEPTED | 0.00 s | details |
| #7 | ACCEPTED | 0.00 s | details |
| #8 | TIME LIMIT EXCEEDED | -- | details |
| #9 | TIME LIMIT EXCEEDED | -- | details |
| #10 | TIME LIMIT EXCEEDED | -- | details |
| #11 | ACCEPTED | 0.00 s | details |
| #12 | TIME LIMIT EXCEEDED | -- | details |
| #13 | ACCEPTED | 0.00 s | details |
| #14 | TIME LIMIT EXCEEDED | -- | details |
| #15 | ACCEPTED | 0.00 s | details |
| #16 | ACCEPTED | 0.00 s | details |
Compiler report
input/code.cpp: In function 'int main()':
input/code.cpp:27:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
27 | for(int l=0; l<sol[i].size(); l++) sol[i][l] = 2* sol[i+1][0];
| ~^~~~~~~~~~~~~~
input/code.cpp:39:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
39 | for(int i=0; i<sol[sol.size()-1].size(); i++){
| ~^~~~~~~~~~~~~~~~~~~~~~~~~
input/code.cpp:41:13: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
41 | if(i!=sol[sol.size()-1].size()-1) cout <<" ";
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~Code
#include <bits/stdc++.h>
#include <limits>
using namespace std;
typedef long long ll;
int main() {
vector<ll> vec(61);
for(int i=0; i<61; i++){
if(i==0)vec[i]=0;
else{
vec[i] = vec[i-1] + i +1;
}
}
ll a,b;
cin >> a >> b;
vector<vector<ll>> sol;
for(int i=1; i<=a; i++){
vector<ll> temp(i,1);
sol.push_back(temp);
}
for(int i=sol.size()-2; i>=0; i--){
for(int l=0; l<sol[i].size(); l++) sol[i][l] = 2* sol[i+1][0];
}
if(sol[0][0]>b){
cout <<"The truth is out there"<<endl;
return 0;
}
while(sol[0][0]!=b){
for(int i=sol.size()-1; i>=0; i--){
sol[i][0] += 1;
}
}
for(int i=0; i<sol[sol.size()-1].size(); i++){
cout << sol[sol.size()-1][i];
if(i!=sol[sol.size()-1].size()-1) cout <<" ";
}
cout << endl;
}Test details
Test 1
Verdict: ACCEPTED
| input |
|---|
| 3 8 |
| correct output |
|---|
| 5 1 1 |
| user output |
|---|
| 5 1 1 |
Test 2
Verdict: ACCEPTED
| input |
|---|
| 2 1 |
| correct output |
|---|
| The truth is out there |
| user output |
|---|
| The truth is out there |
Test 3
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 1 1000000000000000000 |
| correct output |
|---|
| 1000000000000000000 |
| user output |
|---|
| (empty) |
Test 4
Verdict: ACCEPTED
| input |
|---|
| 1 1 |
| correct output |
|---|
| 1 |
| user output |
|---|
| 1 |
Test 5
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 60 1000000000000000000 |
| correct output |
|---|
| 423539247696576513 1 1 1 1 1 1... |
| user output |
|---|
| (empty) |
Test 6
Verdict: ACCEPTED
| input |
|---|
| 10 512 |
| correct output |
|---|
| 1 1 1 1 1 1 1 1 1 1 |
| user output |
|---|
| 1 1 1 1 1 1 1 1 1 1 |
Test 7
Verdict: ACCEPTED
| input |
|---|
| 60 500000000000000000 |
| correct output |
|---|
| The truth is out there |
| user output |
|---|
| The truth is out there |
Test 8
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 5 1000000000 |
| correct output |
|---|
| 999999985 1 1 1 1 |
| user output |
|---|
| (empty) |
Test 9
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 19 1000000000 |
| correct output |
|---|
| 999737857 1 1 1 1 1 1 1 1 1 1 ... |
| user output |
|---|
| (empty) |
Test 10
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 59 1000000000000000000 |
| correct output |
|---|
| 711769623848288257 1 1 1 1 1 1... |
| user output |
|---|
| (empty) |
Test 11
Verdict: ACCEPTED
| input |
|---|
| 42 133713371337 |
| correct output |
|---|
| The truth is out there |
| user output |
|---|
| The truth is out there |
Test 12
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 42 1337133713371337 |
| correct output |
|---|
| 1334934690115786 1 1 1 1 1 1 1... |
| user output |
|---|
| (empty) |
Test 13
Verdict: ACCEPTED
| input |
|---|
| 2 2 |
| correct output |
|---|
| 1 1 |
| user output |
|---|
| 1 1 |
Test 14
Verdict: TIME LIMIT EXCEEDED
| input |
|---|
| 2 1000000000000000000 |
| correct output |
|---|
| 999999999999999999 1 |
| user output |
|---|
| (empty) |
Test 15
Verdict: ACCEPTED
| input |
|---|
| 10 511 |
| correct output |
|---|
| The truth is out there |
| user output |
|---|
| The truth is out there |
Test 16
Verdict: ACCEPTED
| input |
|---|
| 10 513 |
| correct output |
|---|
| 2 1 1 1 1 1 1 1 1 1 |
| user output |
|---|
| 2 1 1 1 1 1 1 1 1 1 |
