This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unordered_map> | |
#include <string> | |
#include <iostream> | |
void sorted(const std::string &a, const std::string &order) { | |
std::unordered_map<char, unsigned int> count; | |
for (auto c : a) | |
++count[c]; | |
for (auto c: order) { | |
for (auto i = count[c]; i > 0; --i) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ISO/IEC 9988:1999 grammar (ISO C) */ | |
%token ID TYPEDEF_NAME INT_CST STRING_CST SIZEOF ; | |
%token ARROW INC DEC ; | |
%token LSHIFT RSHIFT ; | |
%token LE GE ; | |
%token EQ NE ; | |
%token ANDAND OROR ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io" | |
"strings" | |
) | |
const ( | |
None = iota |
NewerOlder