Bryma's blog

By Bryma, history, 3 years ago, In English

Can someone provide me a link or some type of tutorial how am i supossed to write it ? I tells us that we need to write the answers in : int 64 somefunction(int64 [] K) : but how i can test if it's correct or not ?

Full text and comments »

  • Vote: I like it
  • +3
  • Vote: I do not like it

By Bryma, history, 3 years ago, In English

In celebration of the 4th of July, Aldo goes to an American buffet. In this buffet, there are different types of dishes. The -th plate fills a percentage of your stomach and gives you a percentage of happiness.

Aldo can eat a plate at the most once, because he wants variety, and he wants to achieve 100% happiness without going over 100% full. Help Aldo determine the maximum number of dishes he can eat while satisfying his restrictions.

Notes:

It is valid to exceed 100% happiness, but not 100% fullness. It is guaranteed that Aldo can always reach 100% happiness.

Input : The first line contains an integer, the number of dishes. The following lines contain 2 integers each, and the percentages of fullness and happiness that they cause, respectively.

Example input :

  • 3
  • 60 50
  • 30 50
  • 50 60
  • Answer : 2
  • 2
  • 100 20
  • 100 100

Answer : 1

Please, i need at least a hint. I tried to solve it solo but i can't.

Full text and comments »

  • Vote: I like it
  • -8
  • Vote: I do not like it

By Bryma, history, 3 years ago, In English

Hey ! Anyone knows any plugin for GVIM that allows me to parse problems from "COMPETETIVE COMPANION" and test it with sample tests ?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By Bryma, history, 3 years ago, In English

Hi ! First of all HNY 2021 ! Many noobs ( including me) doesn't have a "main" editor that they use for cp so i invite all the people from codeforces (noobs, LGM, etc) to say what's their main editor. :)

EDIT : If you're using vim please tell us , you use "gvim" or "vim".

Full text and comments »

  • Vote: I like it
  • +3
  • Vote: I do not like it

By Bryma, history, 3 years ago, In English

Hi ! I have a problem with debug in c++. I'm using this —

void DBG() { cerr << "]" << endl; } template<class H, class... T> void DBG(H h, T... t) { cerr << to_string(h); if(sizeof...(t)) cerr << ", "; DBG(t...); }

ifdef _DEBUG

define dbg(...) cerr << "LINE(" << LINE << ") -> [" << #__VA_ARGS__ << "]: [", DBG(__VA_ARGS__)

else

define dbg(...) 0

endif

When i type for example — int a = 5; dbg(a);

It's not showing any output.

Full text and comments »

  • Vote: I like it
  • -9
  • Vote: I do not like it