Submission #1012453

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10124532024-07-02 07:53:00m5588ohammedDifference (POI11_roz)C++14
30 / 100
527 ms21208 KiB
/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
int fre[500];
vector <int> v[500],arr;
int pre[2000000];
void construct(char a,char b){
int i=0,j=0;
arr.clear();
while(i!=v[a].size()||j!=v[b].size()){
if(i==v[a].size()){
arr.push_back(-1);
j++;
}
else if(j==v[b].size()){
arr.push_back(1);
i++;
}
else if(v[b][j]>v[a][i]){
arr.push_back(1);
i++;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

roz.cpp: In function 'void construct(char, char)':
roz.cpp:19:16: warning: array subscript has type 'char' [-Wchar-subscripts]
   19 |     while(i!=v[a].size()||j!=v[b].size()){
      |                ^
roz.cpp:19:12: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   19 |     while(i!=v[a].size()||j!=v[b].size()){
      |           ~^~~~~~~~~~~~~
roz.cpp:19:32: warning: array subscript has type 'char' [-Wchar-subscripts]
   19 |     while(i!=v[a].size()||j!=v[b].size()){
      |                                ^
roz.cpp:19:28: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   19 |     while(i!=v[a].size()||j!=v[b].size()){
      |                           ~^~~~~~~~~~~~~
roz.cpp:20:17: warning: array subscript has type 'char' [-Wchar-subscripts]
   20 |         if(i==v[a].size()){
      |                 ^
roz.cpp:20:13: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   20 |         if(i==v[a].size()){
      |            ~^~~~~~~~~~~~~
roz.cpp:24:22: warning: array subscript has type 'char' [-Wchar-subscripts]
   24 |         else if(j==v[b].size()){
      |                      ^
roz.cpp:24:18: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 |         else if(j==v[b].size()){
      |                 ~^~~~~~~~~~~~~
roz.cpp:28:19: warning: array subscript has type 'char' [-Wchar-subscripts]
   28 |         else if(v[b][j]>v[a][i]){
      |                   ^
roz.cpp:28:27: warning: array subscript has type 'char' [-Wchar-subscripts]
   28 |         else if(v[b][j]>v[a][i]){
      |                           ^
roz.cpp: In function 'int main()':
roz.cpp:63:18: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   63 |     for(int i=0;i<s.size();i++) v[s[i]].push_back(i);
      |                 ~^~~~~~~~~
roz.cpp:63:39: warning: array subscript has type 'char' [-Wchar-subscripts]
   63 |     for(int i=0;i<s.size();i++) v[s[i]].push_back(i);
      |                                       ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...