This page is a classified matrix of molecular pages based on two class categories (rows and columns). You can reach actual molecules by clicking each number with a link (except for 0).
local input = stdin:match(".+");
local xaxis, yaxis, all = string.match(input, "([^&]+) || || || || || || || || || ||
, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- );
{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub(" ([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. " (" .. v .. ")&&";
for y,v in string.gmatch(yaxis, "(%S+) (%S+)") do
if (M[x][y] == nil)
then str = str .. " 0 dummy";
else if ({{{3}}} <= {{{4}}})
then str = str .. " " .. M[x][y] .. " " .. strFst .. x .. strSnd .. y .. strTrd;
else str = str .. " " .. M[x][y] .. " " .. strFst .. y .. strSnd .. x .. strTrd;
end
end
end
print(str);
end
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
strSnd = string.sub(" ([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
strTrd = string.sub(" ([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
else
strFst = string.sub(" ([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
strSnd = string.sub(" ([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
strTrd = string.sub(" ([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. " {{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---,}}|| || || || || || || || || || || || || || || || || || || || || || || || || || || ||
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- ([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", 1, {{{2}}}-1);
strSnd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{5}}}+1, string.len("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
"));
else
strFst = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", 1, {{{4}}}-1);
strSnd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{3}}}+1, string.len("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub(" ---", 1, ([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", 1, {{{2}}}-1);
strSnd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{5}}}+1, string.len("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
"));
else
strFst = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", 1, {{{4}}}-1);
strSnd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{3}}}+1, string.len("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
strSnd = string.sub(" ---", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub(" ---", {{{5}}}+1, string.len(" ---"));
else
strFst = string.sub(" ---", 1, {{{4}}}-1);
strSnd = string.sub(" ---", {{{5}}}+1, ([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", 1, {{{2}}}-1);
strSnd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{5}}}+1, string.len("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
"));
else
strFst = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", 1, {{{4}}}-1);
strSnd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{3}}}+1, string.len("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
strTrd = string.sub(" ---", {{{3}}}+1, string.len(" ---"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. " (" .. v .. ")&&";
for y,v in string.gmatch(yaxis, "(%S+) (%S+)") do
if (M[x][y] == nil)
then str = str .. " 0 dummy";
else if ({{{3}}} <= {{{4}}})
then str = str .. " " .. M[x][y] .. " " .. strFst .. x .. strSnd .. y .. strTrd;
else str = str .. " " .. M[x][y] .. " " .. strFst .. y .. strSnd .. x .. strTrd;
end
end
end
print(str);
end />{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 --- が{{{4}}}{{{5}}}より後ろの場合も考慮"}}||
|| || || || || || ||
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- ([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", 1, {{{2}}}-1);
strSnd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{5}}}+1, string.len("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
"));
else
strFst = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", 1, {{{4}}}-1);
strSnd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{3}}}+1, string.len("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub(" 1,", 1, ([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", 1, {{{2}}}-1);
strSnd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{5}}}+1, string.len("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
"));
else
strFst = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", 1, {{{4}}}-1);
strSnd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{3}}}+1, string.len("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
strSnd = string.sub(" 1,", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub(" 1,", {{{5}}}+1, string.len(" 1,"));
else
strFst = string.sub(" 1,", 1, {{{4}}}-1);
strSnd = string.sub(" 1,", {{{5}}}+1, ([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", 1, {{{2}}}-1);
strSnd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{5}}}+1, string.len("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
"));
else
strFst = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", 1, {{{4}}}-1);
strSnd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{3}}}+1, string.len("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
strTrd = string.sub(" 1,", {{{3}}}+1, string.len(" 1,"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. " (" .. v .. ")&&";
for y,v in string.gmatch(yaxis, "(%S+) (%S+)") do
if (M[x][y] == nil)
then str = str .. " 0 dummy";
else if ({{{3}}} <= {{{4}}})
then str = str .. " " .. M[x][y] .. " " .. strFst .. x .. strSnd .. y .. strTrd;
else str = str .. " " .. M[x][y] .. " " .. strFst .. y .. strSnd .. x .. strTrd;
end
end
end
print(str);
end />{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ----1);"}}||
|| || || || || || || || || || || || || || || ||
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- ([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", 1, {{{2}}}-1);
strSnd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{5}}}+1, string.len("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
"));
else
strFst = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", 1, {{{4}}}-1);
strSnd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{3}}}+1, string.len("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub(" {{{5}}}+1,", 1, ([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", 1, {{{2}}}-1);
strSnd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{5}}}+1, string.len("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
"));
else
strFst = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", 1, {{{4}}}-1);
strSnd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{3}}}+1, string.len("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
strSnd = string.sub(" {{{5}}}+1,", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub(" {{{5}}}+1,", {{{5}}}+1, string.len(" {{{5}}}+1,"));
else
strFst = string.sub(" {{{5}}}+1,", 1, {{{4}}}-1);
strSnd = string.sub(" {{{5}}}+1,", {{{5}}}+1, ([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", 1, {{{2}}}-1);
strSnd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{5}}}+1, string.len("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
"));
else
strFst = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", 1, {{{4}}}-1);
strSnd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
", {{{3}}}+1, string.len("{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,([^&]+)&&(.+)");
local M = {};
for id in string.gmatch(all,"(%S+)") do
x = string.sub(id, {{{2}}}, {{{3}}});
y = string.sub(id, {{{4}}}, {{{5}}});
if (M[x] == nil) then M[x] = {}; end
if (M[x][y] == nil)
then M[x][y] = 1;
else M[x][y] = M[x][y] + 1;
end
end
--- {{{2}}}{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ---
if ({{{3}}} <= {{{4}}})
then
strFst = string.sub("{{{1}}}", 1, {{{2}}}-1);
strSnd = string.sub("{{{1}}}", {{{3}}}+1, {{{4}}}-1);
strTrd = string.sub("{{{1}}}", {{{5}}}+1, string.len("{{{1}}}"));
else
strFst = string.sub("{{{1}}}", 1, {{{4}}}-1);
strSnd = string.sub("{{{1}}}", {{{5}}}+1, {{{2}}}-1);
strTrd = string.sub("{{{1}}}", {{{3}}}+1, string.len("{{{1}}}"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&
"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. "
|{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{2}}},{{{3}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
|
}}&&{{#lua:
local H = {};
local T = {};
for id in stdin:gmatch("%S+") do
str = string.sub(id,{{{4}}},{{{5}}});
if (H[str] == nil)
then H[str] = 1; table.insert(T, str);
else H[str] = H[str] + 1;
end
end
table.sort(T);
for i=1,table.getn(T) do
local k = T[i];
print(k .. " " .. H[k]);
end
strTrd = string.sub(" {{{5}}}+1,", {{{3}}}+1, string.len(" {{{5}}}+1,"));
end
for x,v in string.gmatch(xaxis, "(%S+) (%S+)") do
str = x .. " (" .. v .. ")&&";
for y,v in string.gmatch(yaxis, "(%S+) (%S+)") do
if (M[x][y] == nil)
then str = str .. " 0 dummy";
else if ({{{3}}} <= {{{4}}})
then str = str .. " " .. M[x][y] .. " " .. strFst .. x .. strSnd .. y .. strTrd;
else str = str .. " " .. M[x][y] .. " " .. strFst .. y .. strSnd .. x .. strTrd;
end
end
end
print(str);
end />{{{3}}}が{{{4}}}{{{5}}}より後ろの場合も考慮 ----1);"}}||