I recently purchased a Spanish Scrabble set* and want to know what words I can play given what tiles are on the board.
My set uses the following tiles:
A, E x12
O x9
I, S x6
D, N, R, U x5
...
For a matter modelling person, the most valuable resource is computing power. For many of us, computing power at hand limits the scale of problems we can solve. There are many national supercomputing facilities for academics. What are the resources available in each country?
Given two strings as input, return the result of XORing the code-points of one string against the code points of the other.
For each character in the first input string, take the code-point (e.g. for A, this is 65) and XOR the value against the corresponding index in the second string and output ...
#define A m]
a[9999],*m=a;main(){for(2[A=4[A=1;;){for(;4[A;putchar(6[m-=3]+48));for(puts(a);7[A;2[A=4[A,4[A=1)if(4[A+=3[m+=3]-1,9<(3[A=2[A+=3[A))++5[A,7[A=1,3[A-=10;}}
In my Similar Question I asked how to make shortest A+B program in Python. Now I'm aksing how to do the same with C++.
Original Task
My best 62 bytes solution at this moment is:
#import <iostream>
main(){
int a,b;
std::cin >> a >> b;
std::cout << a + b;
}
I have an idea, how to get good solution...
Let's begin with a thought experiment. You have a clock and a timer, in which you start the timer when the clock shows exactly hh:mm.00.
Clock: The clock employs 24-hour time. So the range of hh is 0<=h<23. (Because 23 inputs are unsolvable, you aren't required to handle that)
Timer: It starts e...
> Loop unrolling is a distasteful way to get speed-ups, and does not require much insight or skill. This view is of course depends on your point of view. Since I am posing the puzzle I get to make the rules. :-)
The context in which the puzzle is posed is a hint in itself. The "expert C programmers" to whom I posed the puzzle did not have the benefit of this hint.
As it turns out, Python allows for 1j for to be compressed to 1jfor. However, jfor sounds like xnor. Since all similar-phonic phrases have something in common, there must be some property shared between jfor and xnor.
If we look at the ASCII representation of the first two characters of jfor in b...
Find the maximum sequence contained in the genetic material of a non corona virus living being and contained in GenBank MN908947.3 Sars-Cov-19 virus
We must write a function that has as input two strings s1 and s2 and a positive number n
and returns as output all the substrings common to the two ...
Is this magic square uniquely determined? code-golfmatrixmath
Background
An order-n magic square is an n×n matrix consisting of one of each of the integers from \$1\$ to \$n^2\$ where every row, column, and diagonal sum to the same value. For example, a 3×3 magic square is as follows:
4 9 2
3 5 7...