export all events for this room

Starred posts

Jun 19, 2023 07:45
sum_weights[0] = weightsArr[0]
sum_weights[1] = weightsArr[0] + weightsArr[1]
sum_weights[2] = weightsArr[0] + weightsArr[1] + weightsArr[2]
...
Jun 29, 2022 05:27
// codechef.com/UAPRAC/problems/PSORT3

#include <stdio.h>
#include <stdlib.h>

// Structure to hold a pair of elements
typedef struct _pair
{
    unsigned long long int A;
    unsigned long long int B;
} pair;

// Sorting function
int cmpfunc (const void * a, const void * b)
{
    const pair* first = (const pair*) a;
    const pair* second = (const pair*) b;

    // If the Bs are not equal sort in decreasing order of B
    if (first->B < second->B)
        return 1;
    else if (first->B > second->B)
May 30, 2022 12:50
#include <stdio.h>
#include <string.h>

#define MAX_GRID 100

int num_rows, num_cols;
char grid[MAX_GRID][MAX_GRID];
char new_grid[MAX_GRID][MAX_GRID];

int num_words;
int len_words[MAX_GRID];
char words[MAX_GRID][MAX_GRID];

// Find a word that fits in this row
// row and col give the position of the 'r' that starts the word
// Return 1 if we found a match or 0 if there is no match
int find_row(int row, int col)
{
printf("Debug: find_row(%d, %d)\n", row, col);
    // Find the 'r' that ends the word