V01D
A kernel?
A simple VGA driver would work fine, it is memory mapped IO after all.
V01D
It's not like you have to write your own GDT, IDT and ISR's
V01D
Just do
__asm__ __volatile__("cli");
first thing.
Or of course you do it in ASM:
global disable_interrupts
disable_interrupts:
cli
ret
In a header file you need:
extern void disable_interrupts();
Anunay
We are taking group rules a bit too strictly now, the quality of content here has deteriorated exponentially.
Anunay
Need to get it back to top xD
klimi
Make them more readable too
Roxifλsz 🇱🇹
Or just no rules, and we ban whatever we don't like ( ͡° ͜ʖ ͡°)
Roxifλsz 🇱🇹
Although I do agree that our rules list is fucking massive, and should be simplified somehow
Emir
what subject is this pdf about? Can anyone send me source about this subject?
Kenny
It's about algorithms
Emir
Kenny
the subject is called algorithm
Kenny
You learn complexity, dynamic programming, divide and conquer, greedy algorithms, branch and bound, etc
Kenny
Anonymous
Chef opted for Bio-Statistics as an Open-Elective course in his university, but soon got bored, and decided to text his friends during lectures. The instructor caught Chef, and decided to punish him, by giving him a special assignment.
There are N numbers in a list A=A1,A2,…,AN. Chef needs to find the mode of the frequencies of the numbers. If there are multiple modal values, report the smallest one. In other words, find the frequency of all the numbers, and then find the frequency which has the highest frequency. If multiple such frequencies exist, report the smallest (non-zero) one.
More formally, for every v such that there exists at least one i such that Ai=v, find the number of j such that Aj=v, and call that the frequency of v, denoted by freq(v). Then find the value w such that freq(v)=w for the most number of vs considered in the previous step. If there are multiple values w which satisfy this, output the smallest among them.
As you are one of Chef's friends, help him complete the assignment.
Input:
The first line contains an integer T, the number of test cases.
The first line of each test case contains an integer N, the number of values in Chef's assignment.
The second line of each test case contains N space-separated integers, Ai, denoting the values in Chef's assignment.
Output:
For each test case, print the mode of the frequencies of the numbers, in a new line.
Constraints
1≤T≤100
1≤N≤10000
1≤Ai≤10
Subtasks
30 points : 1≤N≤100
70 points : Original constraints.
Sample Input:
2
8
5 9 2 9 7 2 5 3
9
5 9 2 9 7 2 5 3 1
Sample Output:
2
1
Explanation:
Test case 1: (2, 9 and 5) have frequency 2, while (3 and 7) have frequency 1. Three numbers have frequency 2, while 2 numbers have frequency 1. Thus, the mode of the frequencies is 2.
Test case 2: (2, 9 and 5) have frequency 2, while (3, 1 and 7) have frequency 1. Three numbers have frequency 2, and 3 numbers have frequency 1. Since there are two modal values 1 and 2, we report the smaller one: 1.
Anonymous
What do I do???
Anunay
Dima
Anonymous
What to do for modal frequency??
Anunay
A quick search with your favourite search engine will lead you to your desired destination
Anunay
We will help if you are stuck somewhere, but won't spoon-feed you
Anonymous
Hi
Asdew
Different encoding.
Asdew
I'd say to research UTF encodings.
Asdew
I'm not very sure it's the reason, though.
Asdew
Wait, how are you reading that U+263A?
Asdew
Huh?
Asdew
What's your code?
Asdew
How do you know its length? You must have some code reading it.
Asdew
What properties?
Asdew
What encoding did you use for the files?
Asdew
Is there a new line in the end?
Asdew
Can you send the files?
Kenny
Yes
Merazi
Greetings everybody.
Dima
welcome
Merazi
Thank you
Anonymous
Dima
no
Anonymous
I have sent only message
Anonymous
See once 🙏plz
Anonymous
Anonymous
I Sent message by mistake group admin
Zel
lots of warnings going out today O.o
Kenny
Someone knows how to install g++ compiler on Windows?
Anonymous
Nameful
Anonymous
Nameful
Anonymous
How so?
It's a buggy shit
Anonymous
Doesn't support C++17 fully iirc
Dima
don’t. ever. use. mingw
Dima
Nameful
I will use MinGW
Nameful
On Linux
Nameful
Via Wine
Kenny
Xdddddd
Dima
bruhhhh
Dima
that’s illegal
olli
No, this is bad
why do you think so?
For windows msys2 (Mingw64) is a fast way to use a failry modern gcc compiler (currently 10.2), the environment uses pacman as package manager.
Or you can use the distro provided by Stephan T. Lavavej https://nuwen.net/mingw.html which uses gcc 9.2 and boost 1.71
olli
Have been using both for a while, I can highly recommend them if you want to use GCC on Windows or don't want to install the whole MSVC toolchain
Anonymous
Suraj
Yaa
Anonymous
Yes
Anonymous
Ravi Ranjan:
how to convert .789 from octal to decimal
anyone please explain
Dishant_18cs160
use panda55555 as code and get 1pi as initial value
M__
#include<stdio.h>
#include<windows.h>
void gotoxy(short , short ) ;
void gotoxy(short x , short y)
{
COORD pos ;
pos.X = x ;
pos.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);
}
int main(int argc, char *argv[])
{
gotoxy(10,10);
printf(argv[1]);
getchar();
return 0;
}
hello , i was able to implement gotoxy() in windows (via win32 API i guess) which only used to work in turbo C
but when i run this in linux this gives me error
"path not included"
please help me how to fix this
V01D
Roxifλsz 🇱🇹
M__
ill try
thank yo u
V01D
Sure thing
V01D
/report
Anonymous
Z0OM
i have derived class and base class. calling the constructor of base class wont call contructor of dervied class. am i right?
Alex
yes
Z0OM
and is there a way that i pass arguments to derived class constructor and when the base class contructor gets automatically called. the arguments pass on to it?