Submission #119152

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1191522019-06-20 13:45:22TuGSGeReLPaint By Numbers (IOI16_paint)C++14
32 / 100
3 ms512 KiB
#include "paint.h"
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll long long
#define mp make_pair
#define pub push_back
#define pob pop_back()
#define ss second
#define ff first
#define mt make_tuple
#define pof pop_front()
#define fbo find_by_order
#define ook order_of_key
#define lb lower_bound
#define ub upper_bound
typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
using pll = pair <ll, ll>;
using pii = pair <int, int>;
int dp[100005][101], wh[100001], rdp[100005][101], canw[100005], canb[100005];
string ans;
string solve_puzzle(string s, vector<int> c) {
c.insert(c.begin(), 0);
for (int i = 1; i < s.size(); i++) {
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

paint.cpp: In function 'std::__cxx11::string solve_puzzle(std::__cxx11::string, std::vector<int>)':
paint.cpp:30:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 1; i < s.size(); i++) {
                  ~~^~~~~~~~~~
paint.cpp:39:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < s.size(); i++) {
                  ~~^~~~~~~~~~
paint.cpp:46:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 1; i < c.size(); i++) {
                  ~~^~~~~~~~~~
paint.cpp:47:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int j = 1; j < s.size(); j++) {
                   ~~^~~~~~~~~~
paint.cpp:70:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 1; i < c.size(); i++) {
                  ~~^~~~~~~~~~
paint.cpp:76:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if ( s.size() - j >= c[c.size() - i] )
paint.cpp:81:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if ( rdp[j + 1][i] || (s.size() - j >= c[c.size() - i] && s[j + c[c.size() - i]] != 'X' && rdp[j + c[c.size() - i] + 1][i - 1]) )
paint.cpp:87:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 1; i < s.size(); i++)
                  ~~^~~~~~~~~~
paint.cpp:88:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int j = 0; j < c.size(); j++)
                   ~~^~~~~~~~~~
paint.cpp:92:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 1; i < s.size(); i++)
                  ~~^~~~~~~~~~
paint.cpp:93:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int j = 1; j < c.size(); j++)
                   ~~^~~~~~~~~~
paint.cpp:101:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 1; i < s.size() - 1; 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...